-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDirectory.Build.props
77 lines (60 loc) · 3.02 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
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<!-- Enable deterministic outputs, which can help with build caching-->
<Deterministic>true</Deterministic>
<!-- To enable project specific directory for temporary files. -->
<UseProjectTMPDirectory>true</UseProjectTMPDirectory>
<!-- To enable MSBuild Resource Manager in VS 2019 16.11 (on by default in VS 2022) -->
<UseMSBuildResourceManager>true</UseMSBuildResourceManager>
<!-- Enable MultiToolTask (MTT) mode. -->
<UseMultiToolTask>true</UseMultiToolTask>
<EnforceProcessCountAcrossBuilds>true</EnforceProcessCountAcrossBuilds>
<!-- Enable experimental MTT ClServer mode, available in VS 2022. -->
<EnableClServerMode>true</EnableClServerMode>
<!-- Uncomment and change the value to control the maximum number of cl.exe processes running in parallel.
If using MTT without MSBuild Resource Manager, 10-20% oversubscription is often beneficial. -->
<!--<CL_MPCount>20</CL_MPCount>-->
<!--Uncomment to allow executing more build operations in parallel-->
<BuildPassReferences>true</BuildPassReferences>
<AllowParallelCompileInReferencedProjects>true</AllowParallelCompileInReferencedProjects>
</PropertyGroup>
<!-- For local builds, we stamp the computer and user name and set the PrivateBuild flag-->
<PropertyGroup Condition="'$(OFFICIAL_PIPELINE_BUILD)' == ''">
<IsPrivateBuild>true</IsPrivateBuild>
<PrivateBuildString>Built by $(USERNAME) on $(COMPUTERNAME)</PrivateBuildString>
<IsPrerelease>true</IsPrerelease>
</PropertyGroup>
<!-- For official builds, we stamp the build number and set the OfficialBuild flag-->
<PropertyGroup Condition="'$(OFFICIAL_PIPELINE_BUILD)' != ''">
<IsPrivateBuild>false</IsPrivateBuild>
<IsPrerelease>$(OFFICIAL_PIPELINE_BUILD_ISPRERELEASE)</IsPrerelease>
</PropertyGroup>
<ItemDefinitionGroup>
<!-- Enable parallel compilation (cl.exe /MP) -->
<ClCompile>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<!-- Enable parallel execution of a custom build tool-->
<CustomBuild>
<BuildInParallel>true</BuildInParallel>
</CustomBuild>
<!-- Stamp the private build string into all files -->
<ResourceCompile Condition="$(IsPrivateBuild)">
<PreprocessorDefinitions>%(PreprocessorDefinitions);BUILD_PRIVATE_BUILD_STRING=\"$(PrivateBuildString)\"</PreprocessorDefinitions>
</ResourceCompile>
<ResourceCompile Condition="$(IsPrerelease)">
<PreprocessorDefinitions>%(PreprocessorDefinitions);BUILD_PRERELEASE=1</PreprocessorDefinitions>
</ResourceCompile>
</ItemDefinitionGroup>
<!-- Define project specific directory for temporary files -->
<Target Name="SetProjectTMPDirectory"
Condition="'$(UseProjectTMPDirectory)' == 'true'"
AfterTargets="SetBuildDefaultEnvironmentVariables">
<MakeDir Directories="$(IntDir)TMP"/>
<SetEnv Name ="TMP"
Value ="$(IntDir)TMP"
Prefix ="false">
</SetEnv>
</Target>
</Project>