Merge pull request #15420 from swgillespie/test-build-perf
[platform/upstream/coreclr.git] / dir.props
1 <?xml version="1.0" encoding="utf-8"?>
2 <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3   <Import Condition="Exists('..\dir.props')" Project="..\dir.props" />
4
5   <!--
6     $(OS) is set to Unix/Windows_NT. This comes from an environment variable on Windows and MSBuild on Unix.
7   -->
8   <PropertyGroup>
9     <OsEnvironment Condition="'$(OsEnvironment)'=='' and '$(OS)'=='OSX'">Unix</OsEnvironment>
10     <OsEnvironment Condition="'$(OsEnvironment)'==''">$(OS)</OsEnvironment>
11   </PropertyGroup>
12
13   <!-- Set the kind of PDB to Portable and turn on SourceLink (fetching source from GitHub) -->
14   <PropertyGroup>
15     <DebugType Condition="'$(DebugType)' == ''">Portable</DebugType> 
16     <UseSourceLink>true</UseSourceLink>
17   </PropertyGroup>
18
19   <!-- Version numbers for both managed & native binaries -->
20   <PropertyGroup>
21     <MajorVersion>4</MajorVersion>
22     <MinorVersion>6</MinorVersion>
23   </PropertyGroup>
24
25   <!-- Build Tools Versions -->
26   <PropertyGroup>
27     <RoslynVersion>1.0.0-rc3-20150510-01</RoslynVersion>
28     <RoslynPackageName>Microsoft.Net.ToolsetCompilers</RoslynPackageName>
29   </PropertyGroup>
30
31   <!--
32      Switching to the .NET Core version of the BuildTools tasks seems to break numerous scenarios, such as VS intellisense and resource designer
33      as well as running the build on mono. Until we can get these sorted out we will continue using the .NET 4.5 version of the tasks.
34      -->
35   <PropertyGroup>
36     <RunningOnCore>false</RunningOnCore>
37     <RunningOnCore Condition="'$(MSBuildRuntimeType)' == 'Core'">true</RunningOnCore>
38     <BuildToolsTargetsDesktop>false</BuildToolsTargetsDesktop>
39     <BuildToolsTargetsDesktop Condition="'$(RunningOnCore)' != 'true'">true</BuildToolsTargetsDesktop>
40     <BuildToolsTargets45>$(BuildToolsTargetsDesktop)</BuildToolsTargets45>
41   </PropertyGroup>
42
43   <!-- Common properties -->
44   <PropertyGroup>
45     <!-- Set basic properties and normalize -->
46     <BuildArch>$(__BuildArch)</BuildArch>
47     <BuildArch Condition="'$(__BuildArch)'==''">x64</BuildArch>
48     <BuildArch Condition="'$(__BuildArch)' == 'amd64'">x64</BuildArch>
49
50     <BuildType Condition="'$(__BuildType)'==''">Debug</BuildType>
51     <BuildType Condition="'$(__BuildType)' == 'debug'">Debug</BuildType>
52     <BuildType Condition="'$(__BuildType)' == 'release'">Release</BuildType>
53     <BuildType Condition="'$(__BuildType)' == 'checked'">Checked</BuildType>
54
55     <BuildOS>$(__BuildOS)</BuildOS>
56     <BuildOS Condition="'$(__BuildOS)' == ''">Windows_NT</BuildOS>
57
58     <ProjectDir>$(__ProjectDir)\</ProjectDir>
59     <ProjectDir Condition="'$(__ProjectDir)'==''">$(MSBuildThisFileDirectory)</ProjectDir>
60
61     <SourceDir>$(__SourceDir)\</SourceDir>
62     <SourceDir Condition="'$(__SourceDir)'==''">$(ProjectDir)src\</SourceDir>
63
64     <!-- This name is used to create a GIT repository URL https://github.com/dotnet/$(GitHubRepositoryName) used to find source code for debugging -->
65     <GitHubRepositoryName Condition="'$(GitHubRepositoryName)' == ''">coreclr</GitHubRepositoryName>
66
67     <PackagesDir>$(DotNetRestorePackagesPath)</PackagesDir>
68     <PackagesDir Condition="'$(PackagesDir)'=='' and '$(__PackagesDir)'!=''">$(__PackagesDir)\</PackagesDir>
69     <PackagesDir Condition="'$(PackagesDir)'==''">$(ProjectDir)packages\</PackagesDir>
70
71     <RootBinDir>$(__RootBinDir)\</RootBinDir>
72     <RootBinDir Condition="'$(__RootBinDir)'==''">$(ProjectDir)bin\</RootBinDir>
73
74     <BinDir>$(__BinDir)\</BinDir>
75     <BinDir Condition="'$(__BinDir)'==''">$(RootBinDir)Product\$(BuildOS).$(BuildArch).$(BuildType)\</BinDir>
76
77     <__IntermediatesDir Condition="'$(__IntermediatesDir)' == ''">$(RootBinDir)obj\$(BuildOS).$(BuildArch).$(BuildType)</__IntermediatesDir>
78     <IntermediateOutputRootPath Condition="'$(IntermediateOutputRootPath)' == ''">$(__IntermediatesDir)\</IntermediateOutputRootPath>
79
80     <!-- We don't append back slash because this path is used by nuget.exe as output directory and it
81          fails to write packages to it if the path contains the forward slash.
82     -->
83     <PackagesBinDir>$(__PackagesBinDir)</PackagesBinDir>
84     <PackagesBinDir Condition="'$(__PackagesBinDir)'==''">$(BinDir).nuget\</PackagesBinDir>
85
86     <ToolsDir Condition="'$(ToolsDir)'==''">$(ProjectDir)Tools\</ToolsDir>
87     <DotnetCliPath Condition="'$(DotnetCliPath)'==''">$(ToolsDir)dotnetcli\</DotnetCliPath>
88     <OverrideToolHost>$(DotnetCliPath)dotnet</OverrideToolHost>
89     <BuildToolsSemaphore Condition="'$(BuildToolsSemaphore)' == ''">$(ToolsDir)Microsoft.DotNet.Build.Tasks.dll</BuildToolsSemaphore>
90
91     <TestWorkingDir>$(__TestWorkingDir)\</TestWorkingDir>
92     <TestWorkingDir Condition="'$(__TestWorkingDir)'==''">$(RootBinDir)tests\$(BuildOS).$(BuildArch).$(BuildType)\</TestWorkingDir>
93
94     <Platform Condition="'$(Platform)' == ''">$(BuildArch)</Platform>
95     <Platform Condition="'$(Platform)' == 'amd64'">x64</Platform>
96
97     <!-- Default to portable build if not explicitly set -->
98     <PortableBuild Condition="'$(PortableBuild)' == ''">true</PortableBuild>
99   </PropertyGroup>
100
101   <!-- Output paths -->
102   <PropertyGroup>
103     <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' == ''">$(RootBinDir)obj\</BaseIntermediateOutputPath>
104     <IntermediateOutputPath Condition="'$(IntermediateOutputPath)' == ''">$(BaseIntermediateOutputPath)$(BuildOS).$(BuildArch).$(BuildType)\$(MSBuildProjectName)</IntermediateOutputPath>
105     <OutputPath Condition="'$(OutputPath)' == ''">$(BinDir)</OutputPath>
106   </PropertyGroup>
107
108   <!-- Explicitly set BuildVersionFile before importing common. This is used by BuildVersion.targets. -->
109   <PropertyGroup Condition="'$(OfficialBuildId)' != ''">
110     <BuildVersionFile>$(BaseIntermediateOutputPath)BuildVersion-$(OfficialBuildId).props</BuildVersionFile>
111   </PropertyGroup>
112
113   <!-- Import Build tools common props file where repo-independent properties are found -->
114   <Import Condition="Exists('$(ToolsDir)Build.Common.props')" Project="$(ToolsDir)Build.Common.props" />
115
116   <!-- Setup common target properties that we use to conditionally include sources -->
117   <PropertyGroup>
118     <TargetsFreeBSD Condition="'$(BuildOS)' == 'FreeBSD'">true</TargetsFreeBSD>
119     <TargetsLinux Condition="'$(BuildOS)' == 'Linux'">true</TargetsLinux>
120     <TargetsNetBSD Condition="'$(BuildOS)' == 'NetBSD'">true</TargetsNetBSD>
121     <TargetsOSX Condition="'$(BuildOS)' == 'OSX'">true</TargetsOSX>
122     <TargetsWindows Condition="'$(BuildOS)' == 'Windows_NT'">true</TargetsWindows>
123
124     <TargetsUnix Condition="'$(TargetsFreeBSD)' == 'true' or '$(TargetsLinux)' == 'true' or '$(TargetsNetBSD)' == 'true' or '$(TargetsOSX)' == 'true'">true</TargetsUnix>
125
126     <!-- We are only tracking Linux Distributions for Nuget RID mapping -->
127     <DistroRid Condition="'$(TargetsLinux)' == 'true'">$(__DistroRid)</DistroRid>
128
129   </PropertyGroup>
130
131   <!-- Provides properties for dependency versions and configures dependency verification/auto-upgrade. -->
132   <Import Project="$(ProjectDir)dependencies.props" />
133
134   <!-- Packaging properties -->
135   <PropertyGroup>
136     <LicenseUrl>https://github.com/dotnet/coreclr/blob/master/LICENSE.TXT</LicenseUrl>
137     <PackageDescriptionFile>$(SourceDir).nuget/descriptions.json</PackageDescriptionFile>
138     <PackageLicenseFile>$(ProjectDir)LICENSE.TXT</PackageLicenseFile>
139     <PackageThirdPartyNoticesFile>$(ProjectDir)THIRD-PARTY-NOTICES.TXT</PackageThirdPartyNoticesFile>
140     <SyncInfoDirectory>$(BaseIntermediateOutputPath)</SyncInfoDirectory>
141
142     <!-- This should be kept in sync with package details in src/.nuget/init/project.json -->
143     <RuntimeIdGraphDefinitionVersion>1.0.2-beta-24224-02</RuntimeIdGraphDefinitionVersion>
144     <RuntimeIdGraphDefinitionFile>$(PackagesDir)/microsoft.netcore.platforms/$(RuntimeIdGraphDefinitionVersion)/runtime.json</RuntimeIdGraphDefinitionFile>
145
146     <!-- This link should be updated for each release milestone, currently this points to 1.1.0-beta -->
147     <ReleaseNotes>https://go.microsoft.com/fwlink/?LinkID=799421</ReleaseNotes>
148
149     <ProjectUrl>https://dot.net</ProjectUrl>
150
151     <!-- On Windows, MSbuild still runs against Desktop FX while it runs on .NET Core on non-Windows. this requires
152          pulling in different packaging dependencies.
153      -->
154     <PackagingTaskDir Condition="'$(TargetsWindows)' == 'true'">$(ToolsDir)net46/</PackagingTaskDir>
155     <!-- defined in buildtools packaging.targets, but we need this before targets are imported -->
156     <PackagePlatform Condition="'$(PackagePlatform)' == ''">$(Platform)</PackagePlatform>
157     <PackagePlatform Condition="'$(PackagePlatform)' == 'amd64'">x64</PackagePlatform>
158     <MinOSForArch>win7</MinOSForArch>
159     <MinOSForArch Condition="'$(PackagePlatform)' == 'arm'">win8</MinOSForArch>
160     <MinOSForArch Condition="'$(PackagePlatform)' == 'arm64'">win10</MinOSForArch>
161     <!-- This property must be set to disable local package installation -->
162     <SkipInstallLocallyBuiltPackages>true</SkipInstallLocallyBuiltPackages>
163
164     <!-- Define packaging attributes for cross target components -->
165     <HasCrossTargetComponents Condition="'$(TargetsWindows)' == 'true' and ('$(PackagePlatform)' =='arm64' or '$(PackagePlatform)' =='arm')">true</HasCrossTargetComponents>
166     <CrossTargetComponentFolder Condition="'$(PackagePlatform)' == 'arm64'">x64</CrossTargetComponentFolder>
167     <CrossTargetComponentFolder Condition="'$(PackagePlatform)' == 'arm'">x86</CrossTargetComponentFolder>
168
169     <PackageOutputPath Condition="'$(PackageOutputPath)' == ''">$(PackagesBinDir)/pkg/</PackageOutputPath>
170     <SymbolPackageOutputPath Condition="'$(SymbolPackageOutputPath)' == ''">$(PackagesBinDir)/symbolpkg/</SymbolPackageOutputPath>
171     <PackageIndexFile>$(MSBuildThisFileDirectory)/src/.nuget/packageIndex.json</PackageIndexFile>
172
173     <!-- coreclr doesn't currently use the index so don't force it to be in sync -->
174     <SkipIndexCheck>true</SkipIndexCheck>
175   </PropertyGroup>
176
177   <!-- Add required legal files to packages -->
178   <ItemGroup Condition="'$(MSBuildProjectExtension)' == '.pkgproj'">
179     <File Condition="Exists('$(PackageLicenseFile)')"
180           Include="$(PackageLicenseFile)" >
181       <SkipPackageFileCheck>true</SkipPackageFileCheck>
182     </File>
183     <File Condition="Exists('$(PackageThirdPartyNoticesFile)')"
184           Include="$(PackageThirdPartyNoticesFile)" >
185       <SkipPackageFileCheck>true</SkipPackageFileCheck>
186     </File>
187     <PackageIndex Include="$(PackageIndexFile)" />
188   </ItemGroup>
189
190   <!-- Use Roslyn Compilers to build -->
191   <Import Project="$(RoslynPropsFile)" Condition="'$(RunningOnUnix)'!='true' and Exists('$(RoslynPropsFile)') and '$(UseRoslynCompilers)'!='false' and '$(RoslynIncompatibleMsbuildVersion)' != 'true'" />
192   <Import Project="$(RoslynPropsFile)" Condition="'$(RunningOnUnix)'=='true' and Exists('$(RoslynPropsFile)') and '$(RoslynIncompatibleMsbuildVersion)' != 'true'" />
193 </Project>