This repository has been archived by the owner on Jun 5, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Directory.Build.props
84 lines (76 loc) · 5.56 KB
/
Directory.Build.props
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<Project>
<!--
Description:
This property file is imported by the projects in this repository to set global locations
common to all of the projects for a consistent build.
-->
<!--
Allow for a parent to provide/override the defaults provided here
Projects importing this property sheet can still override those settings.
Implementation Note:
ALL properties defined here should be done conditionally to allow inheriting from
a parent. Conditional properties makes this project a well behaved sub module for
other projects that might want to set the build outputs etc... into a different place.
-->
<PropertyGroup>
<!-- Default to x86/Win32 | Debug build if not otherwise specified -->
<Platform Condition="'$(Platform)'=='' AND '$(MSBuildProjectExtension)'!='.vcxproj'">AnyCPU</Platform>
<Platform Condition="'$(Platform)'=='' AND '$(MSBuildProjectExtension)'=='.vcxproj'">Win32</Platform>
<Platform Condition="$(Platform)=='x86' AND '$(MSBuildProjectExtension)'=='.vcxproj'">Win32</Platform>
<UnifiedPlatformPathName Condition="'$(UnifiedPlatformPathName)'==''">$(Platform)</UnifiedPlatformPathName>
<UnifiedPlatformPathName Condition="'$(UnifiedPlatformPathName)'=='Win32'">x86</UnifiedPlatformPathName>
<UnifiedPlatformPathName Condition="'$(UnifiedPlatformPathName)'=='AnyCPU'">x86</UnifiedPlatformPathName>
<Configuration Condition="'$(Configuration)'==''">Debug</Configuration>
<!-- Use the location of this file (at the top of the build tree) to define the root directory, if not already set -->
<BuildRootDir Condition="'$(BuildRootDir)'==''">$(MSBuildThisFileDirectory)</BuildRootDir>
<BuildRootDir>$([MSBuild]::EnsureTrailingSlash("$(BuildRootDir)"))</BuildRootDir>
<!-- Put build output and intermediate output files into a well known location outside of the source tree -->
<BaseBuildOutputPath Condition="'$(BaseBuildOutputPath)'==''">$([MSBuild]::NormalizeDirectory("$(BuildRootDir)", "BuildOutput"))</BaseBuildOutputPath>
<BaseBuildOutputPath>$([MSBuild]::EnsureTrailingSlash("$(BaseBuildOutputPath)"))</BaseBuildOutputPath>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'==''" >$([MSBuild]::NormalizeDirectory("$(BaseBuildOutputPath)", "Intermediate", "$(MSBuildProjectName)"))</BaseIntermediateOutputPath>
<IntDir Condition="'$(IntDir)'==''">$([MSBuild]::NormalizeDirectory("$(BaseIntermediateOutputPath)", "$(UnifiedPlatformPathName)", "$(Configuration)"))</IntDir>
<BaseOutputPath Condition="'$(BaseOutputPath)'==''">$([MSBuild]::NormalizeDirectory("$(BaseBuildOutputPath)","bin"))</BaseOutputPath>
<PackageOutputPath Condition="'$(PackageOutputPath)'==''">$([MSBuild]::NormalizeDirectory("$(BaseBuildOutputPath)","NuGet"))</PackageOutputPath>
<BuildOutputPackagesDir Condition="'$(BuildOutputPackagesDir)'==''">$(BaseBuildOutputPath)packages\</BuildOutputPackagesDir>
<BuildVersionXmlFile Condition="'$(BuildVersionXmlFile)'==''">$(MSBuildThisFileDirectory)BuildVersion.xml</BuildVersionXmlFile>
<IsAutomatedBuild Condition="'$(IsAutomatedBuild)'=='' AND '$(APPVEYOR)'!=''">true</IsAutomatedBuild>
<IsAutomatedBuild Condition="'$(IsAutomatedBuild)'==''">false</IsAutomatedBuild>
<IsPullRequestBuild Condition="'$(IsPullRequestBuild)'=='' AND '$(APPVEYOR_PULL_REQUEST_NUMBER)'!=''">true</IsPullRequestBuild>
<IsPullRequestBuild Condition="'$(IsPullRequestBuild)'==''">false</IsPullRequestBuild>
</PropertyGroup>
<Choose>
<!-- Apply standard analyzers and rule sets for all C# projects -->
<When Condition="'$(MSBuildProjectExtension)'=='.csproj'">
<PropertyGroup>
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)Llvm.NET.ruleset</CodeAnalysisRuleSet>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<Determenistic>true</Determenistic>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AnalyzerPowerPack" Version="1.1.0" PrivateAssets="All" />
<PackageReference Include="RefactoringEssentials" Version="5.2.0" PrivateAssets="All" />
<PackageReference Include="StyleCop.Analyzers" Version="1.0.2" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)Llvm.NET.ruleset" Link="Llvm.NET.ruleset" />
</ItemGroup>
<ItemGroup>
<!--
When using EnableDefaultCompileItems=false this is needed to prevent the IDE from
showing all files via the default "none glob". See: https://github.com/dotnet/sdk/issues/1157
Why anyone would want a project system that pulled in all files implicitly instead
of an explicit model is beyond me.
-->
<None Remove="**" />
</ItemGroup>
</When>
<When Condition="'$(MSBuildProjectExtension)'=='.vcxproj'">
<!-- vcxproj uses a different pattern for output paths -->
<PropertyGroup>
<OutputPath Condition="'$(OutputPath)'==''">$([MSBuild]::NormalizeDirectory("$(BaseOutputPath)", "$(Configuration)", "native", "$(UnifiedPlatformPathName)"))</OutputPath>
<OutputPath>$([MSBuild]::EnsureTrailingSlash("$(OutputPath)"))</OutputPath>
<OutDir Condition="'$(OutDir)'==''">$(OutputPath)</OutDir>
</PropertyGroup>
</When>
</Choose>
</Project>