diff options
author | junghyuk.park <junghyuk.park@samsung.com> | 2018-06-25 16:12:39 +0900 |
---|---|---|
committer | Gleb Balykov <g.balykov@samsung.com> | 2018-09-18 15:49:14 +0300 |
commit | 30d8d19b4b2e59f762bce8da1903ed1391f324db (patch) | |
tree | 44bd21728567b44014ed47c77fed9f6dcf7f79ab /Tools/resolveContract.targets | |
parent | 69a62b8aff04b915b955fd39c565267fbd528518 (diff) | |
download | coreclr-30d8d19b4b2e59f762bce8da1903ed1391f324db.tar.gz coreclr-30d8d19b4b2e59f762bce8da1903ed1391f324db.tar.bz2 coreclr-30d8d19b4b2e59f762bce8da1903ed1391f324db.zip |
[Tizen] Add BuildTools 2.1.0-rc1-02804-05
Diffstat (limited to 'Tools/resolveContract.targets')
-rwxr-xr-x | Tools/resolveContract.targets | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Tools/resolveContract.targets b/Tools/resolveContract.targets new file mode 100755 index 0000000000..1bce2266d3 --- /dev/null +++ b/Tools/resolveContract.targets @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + + <PropertyGroup Condition="'$(ResolveMatchingContract)' == 'true'"> + <AddProjectReferencesDynamicallyDependsOn> + ResolveMatchingContract; + $(AddProjectReferencesDynamicallyDependsOn); + </AddProjectReferencesDynamicallyDependsOn> + <ResolveReferencesDependsOn> + $(ResolveReferencesDependsOn); + VerifyMatchingContract + </ResolveReferencesDependsOn> + </PropertyGroup> + + <Target Name="ResolveMatchingContract"> + <PropertyGroup> + <ContractProject Condition="'$(ContractProject)' == ''">$(SourceDir)/$(MSBuildProjectName)/ref/$(MSBuildProjectName).csproj</ContractProject> + <HasMatchingContract Condition="'$(HasMatchingContract)' == '' and Exists('$(ContractProject)')">true</HasMatchingContract> + <ContractAssemblyPath Condition="'$(ContractAssemblyPath)' == ''">$(ContractOutputPath)/$(MSBuildProjectName).dll</ContractAssemblyPath> + </PropertyGroup> + + <ItemGroup Condition="'$(HasMatchingContract)' == 'true'"> + <ResolvedMatchingContract Condition="Exists('$(ContractAssemblyPath)')" Include="$(ContractAssemblyPath)" /> + + <!-- If the contract doesn't exist in the default contract output path add a project reference to the contract project to resolve --> + <ProjectReference Condition="'@(ResolvedMatchingContract)' == ''" Include="$(ContractProject)"> + <ReferenceOutputAssembly>false</ReferenceOutputAssembly> + <OutputItemType>ResolvedMatchingContract</OutputItemType> + </ProjectReference> + </ItemGroup> + </Target> + + <Target Name="VerifyMatchingContract"> + <Error Condition="'$(HasMatchingContract)' == 'true' and !Exists('%(ResolvedMatchingContract.Identity)')" Text="ResolveMatchingContract could not find a matching contract '%(ResolvedMatchingContract.Identity)' not found." /> + </Target> +</Project>
\ No newline at end of file |