diff options
author | Rama Krishnan Raghupathy <ramarag@microsoft.com> | 2015-03-06 18:15:55 -0800 |
---|---|---|
committer | Rama Krishnan Raghupathy <ramarag@microsoft.com> | 2015-03-06 18:15:55 -0800 |
commit | 2a1f5a35ad3678f9175a0c937eeb07a29c65ba8a (patch) | |
tree | b0a65a0a4785e4deb39ec1eed8eba4ddff486b79 /tests/src/dir.targets | |
parent | 182d4e2ef3bea406de49147bb732767fa6190f93 (diff) | |
download | coreclr-2a1f5a35ad3678f9175a0c937eeb07a29c65ba8a.tar.gz coreclr-2a1f5a35ad3678f9175a0c937eeb07a29c65ba8a.tar.bz2 coreclr-2a1f5a35ad3678f9175a0c937eeb07a29c65ba8a.zip |
With This change the tests build all the native components first and then builds the managed components. The managed components can refer to the native projects by the following construct in the .csproj
<ProjectReference Include="CMakeLists.txt">
[tfs-changeset: 1427574]
Diffstat (limited to 'tests/src/dir.targets')
-rw-r--r-- | tests/src/dir.targets | 51 |
1 files changed, 48 insertions, 3 deletions
diff --git a/tests/src/dir.targets b/tests/src/dir.targets index 853685d06c..a149ad5008 100644 --- a/tests/src/dir.targets +++ b/tests/src/dir.targets @@ -55,8 +55,53 @@ Condition="'$(GenerateRunScript)' != 'false'" DependsOnTargets="GenerateExecutionScriptsInternal" /> -<PropertyGroup> - <OutDir>$(BaseOutputPathWithConfig)$(BuildProjectRelativeDir)\</OutDir> -</PropertyGroup> + <PropertyGroup> + <OutDir>$(BaseOutputPathWithConfig)$(BuildProjectRelativeDir)\</OutDir> + </PropertyGroup> + + <Target Name="CopyNativeProjectBinaries"> + <ItemGroup> + <NativeProjectBinaries Include="$(NativeProjectOutPutFolder)\**\*.*" /> + </ItemGroup> + + <Error Text="Then Native Project files are missing in $(NativeProjectOutPutFolder) please run build from the root of the repo at least once" + Condition="'@(NativeProjectBinaries)' == ''" /> + + <Copy + SourceFiles="@(NativeProjectBinaries)" + DestinationFiles="@(NativeProjectBinaries -> '$(OutDir)%(RecursiveDir)%(Filename)%(Extension)')" + SkipUnchangedFiles="$(SkipCopyUnchangedFiles)" + OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" + Retries="$(CopyRetryCount)" + RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" + UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)"> + <Output TaskParameter="DestinationFiles" ItemName="FileWrites" /> + </Copy> + </Target> + <Target Name="ResolveCmakeNativeProjectReference" + Condition="'@(ProjectReference)' != ''" + BeforeTargets="BeforeResolveReferences;BeforeClean" > + <ItemGroup> + <NativeProjectReference Include="%(ProjectReference.Identity)" Condition="$([System.String]::Copy(%(ProjectReference.FileName)).ToUpper()) == 'CMAKELISTS'" /> + <ProjectReference Remove="%(NativeProjectReference.Identity)" /> + <NativeProjectReferenceNormalized Include="@(NativeProjectReference -> '%(FullPath)')" /> + </ItemGroup> + </Target> + + <Target Name="ConsolidateNativeProjectReference" + Condition="'@(ProjectReference)' != ''" + BeforeTargets="Build" > + <ItemGroup> + <NativeProjectOutPutFoldersToCopy Include="$([System.String]::Copy('%(NativeProjectReferenceNormalized.RelativeDir)').Replace($(SourceDir),$(__CMakeTestSlnDir)src\))$(Configuration)\"/> + </ItemGroup> + + <Message Text= "Project filese are :$([System.String]::Copy(%(ProjectReference.FileName)).ToUpper()) " /> + <Message Text= "Project refernce are :%(ProjectReference.Identity)" /> + <Message Text= "Native Project refernce are :%(NativeProjectReference.Identity)" /> + <Message Text= "Native Project refernce are :%(NativeProjectReferenceNormalized.Identity)" /> + <Message Text= "Native Binaries will be copied from :%(NativeProjectOutPutFoldersToCopy.Identity)" /> + <MSBuild Projects="$(MSBuildProjectFile)" Targets="CopyNativeProjectBinaries" Properties="NativeProjectOutPutFolder=%(NativeProjectOutPutFoldersToCopy.Identity)" Condition="'@(NativeProjectReference)' != ''" /> + + </Target> </Project> |