This repository has been archived by the owner on Sep 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 60
/
Copy pathCommon.Build.settings
235 lines (205 loc) · 11.7 KB
/
Common.Build.settings
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
InitialTargets="CopyToOutputDirectoryAlwaysError" >
<!-- Ensures that if this file changes it forces a rebuild -->
<PropertyGroup>
<MSBuildAllProjects>
$(MSBuildAllProjects);$(MSBuildThisFileFullPath)
</MSBuildAllProjects>
</PropertyGroup>
<!-- default configuration -->
<PropertyGroup>
<Configuration Condition="'$(Configuration)'==''">Debug</Configuration>
<Platform Condition="'$(Platform)'==''">Win32</Platform>
</PropertyGroup>
<!-- for root paths -->
<PropertyGroup>
<BuildRoot>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), build.root))</BuildRoot>
<TargetsPath>$(BuildRoot)\msvc</TargetsPath>
<OsVersion>$(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion@CurrentVersion)</OsVersion>
<!--If Dev11 and Dev12 are both installed, the default is to build Dev12. This can be overridden by setting the DevToolsVersion variable in powershell-->
<DevToolsVersion Condition="'$(DevToolsVersion)' == '' And '$(VS120COMNTOOLS)' != ''">120</DevToolsVersion>
<DevToolsVersion Condition="'$(DevToolsVersion)' == '' And '$(VS110COMNTOOLS)' != ''">110</DevToolsVersion>
<!-- ARM tools are installed in $(FrameworkSdkDir)\DesignTime\CommonConfiguration\Neutral\Windows.desktop.arm.props -->
<FrameworkSdkDir Condition="'$(FrameworkSdkDir)'==''">$(WindowsSdkDir)</FrameworkSdkDir>
<WindowsSDKDesktopARMSupport Condition="'$(DevToolsVersion)'=='120' AND Exists('$(FrameworkSdkDir)\DesignTime\CommonConfiguration\Neutral\Windows.desktop.arm.props')" >true</WindowsSDKDesktopARMSupport>
<WindowsSDKDesktopARMSupport Condition="'$(DevToolsVersion)'=='110' AND Exists('$(FrameworkSdkDir)\DesignTime\CommonConfiguration\Neutral\Windows.desktop.arm.props')" >true</WindowsSDKDesktopARMSupport>
<WindowsSDKDesktopARMSupport Condition="'$(DevToolsVersion)'=='110' AND !Exists('$(FrameworkSdkDir)\DesignTime\CommonConfiguration\Neutral\Windows.desktop.arm.props')">false</WindowsSDKDesktopARMSupport>
</PropertyGroup>
<!-- paths can be overridden by configuration -->
<PropertyGroup>
<OutputPath>$(BuildRoot)\output\$(Configuration)\</OutputPath>
<OutDir>$(OutputPath)</OutDir>
<TestRoot>$(BuildRoot)\Release\Tests</TestRoot>
<WebsocketppIncludeDir>$(BuildRoot)\Release\libs\websocketpp</WebsocketppIncludeDir>
<PackagesRoot Condition="'$(PackagesRoot)'=='' AND Exists('$(BuildRoot)\packages')">$(BuildRoot)\packages</PackagesRoot>
<PackagesRoot Condition="'$(PackagesRoot)'=='' AND Exists('$(BuildRoot)\..\Tools\packages')">$(BuildRoot)\..\Tools\packages</PackagesRoot>
<CollateralsDir>$(BuildRoot)\Release\Collateral</CollateralsDir>
<PocoRoot Condition="'$(PocoRoot)'=='' AND Exists('$(BuildRoot)\..\Tools\poco\poco$(DevToolsVersion)')">$(BuildRoot)\..\Tools\poco\poco$(DevToolsVersion)</PocoRoot>
</PropertyGroup>
<!-- paths will not be overridden -->
<PropertyGroup>
<OutDir Condition="'$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)')">$(OutDir)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(DevToolsVersion)' == '110'">
<DevEnvDir>$(VS110COMNTOOLS)..\IDE</DevEnvDir>
</PropertyGroup>
<PropertyGroup Condition="'$(DevToolsVersion)' == '120'">
<DevEnvDir>$(VS120COMNTOOLS)..\IDE</DevEnvDir>
</PropertyGroup>
<PropertyGroup>
<BinaryDependencies>$(TargetsPath)\BinaryDependencies</BinaryDependencies>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<!--For C#:-->
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<!-- RunCodeAnalysis, false by default, is set true as necessary from the msbuild command line. -->
<!-- This is normally done for the gated checkin build. -->
<RunCodeAnalysis Condition="'$(RunCodeAnalysis)'==''">false</RunCodeAnalysis>
<EnableCPPAnalysis Condition="'$(EnableCPPAnalysis)'==''">$(RunCodeAnalysis)</EnableCPPAnalysis>
<CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors>
<!-- This is overridden in Release.Product.settings and Release.Tests.settings. -->
<StyleCopEnabled Condition="'$(StyleCopEnabled)'==''">true</StyleCopEnabled>
<!-- Set LinkIncremental, WholeProgramOptimization, unless they were already set in CodeCoverage.proj. -->
<LinkIncremental Condition="'$(LinkIncremental)'=='' And '$(Configuration)'=='Debug'">true</LinkIncremental>
<LinkIncremental Condition="'$(LinkIncremental)'=='' And '$(Configuration)'!='Debug'">false</LinkIncremental>
<WholeProgramOptimization Condition="'$(WholeProgramOptimization)'=='' And '$(Configuration)'=='Debug'">false</WholeProgramOptimization>
<WholeProgramOptimization Condition="'$(WholeProgramOptimization)'=='' And '$(Configuration)'!='Debug'">true</WholeProgramOptimization>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
<TreatWarningAsError Condition="'$(TreatWarningsAsErrors)' != ''">true</TreatWarningAsError>
<EnablePREfast>$(EnableCPPAnalysis)</EnablePREfast>
<CompileAsManaged Condition="'$(CompileAsManagedDefault)' != ''">true</CompileAsManaged>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PreprocessorDefinitions>_WIN64;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<ClCompile>
<PreprocessorDefinitions>WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PreprocessorDefinitions>_WIN64;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<ClCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|Win32' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<InstallerPlatform>x86</InstallerPlatform>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<DefineConstants>DEBUG;TRACE;X64</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|Win32' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<DefineConstants>TRACE</DefineConstants>
<InstallerPlatform>x86</InstallerPlatform>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<DefineConstants>TRACE;X64</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|ARM' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<DefineConstants>DEBUG;TRACE;ARM</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|ARM' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<DefineConstants>TRACE;ARM</DefineConstants>
</PropertyGroup>
<!--end paths configuration -->
<Target Name="CopyToOutputDirectoryAlwaysError"
Condition="'@(Content)'!='' or '@(None)'!=''">
<Error Condition="'%(Content.CopyToOutputDirectory)'=='Always'" Text="CopyToOutputDirectory is not allowed to be 'Always'. Use 'PreserveNewest' instead." File="$(MSBuildProjectFile)" />
<Error Condition="'%(None.CopyToOutputDirectory)'=='Always'" Text="CopyToOutputDirectory is not allowed to be 'Always'. Use 'PreserveNewest' instead." File="$(MSBuildProjectFile)" />
</Target>
<!-- BEGIN: Workaround for MSBuild.exe bug that will be fixed in v4.5 -->
<!-- Bug Symptom: -->
<!-- Multi-proc build returns "CSC : fatal error CS0009: Metadata file '(FilePath)' could not be opened == 'File is corrupt.' -->
<!-- Bug Cause: -->
<!-- "We are sharing the resultsbytargets dictionary between build results. -->
<!-- We return build result A but do some merging of results in build result B -->
<!-- B is a copy of A sharing the same resultsbyTargets. -->
<!-- The merging of results into B causes extra target outputs to be put into A -->
<!-- and when we return A we see these extra results. -->
<!-- Bug Workaround: -->
<!-- Since items are bleeding across, they still have metadata we can use to differentiate them. -->
<!-- This error seems to be specific to items that have CopyToOutputDirectory -->
<!-- defined (Content, None, etc.) that bleed into _ResolvedProjectReferencePaths. -->
<!-- So, we will remove items from _ResolvedProjectReferencePaths that have CopyToOutputDirectory defined. -->
<!-- There may be other places where the underlying bug manifests, but we have not encountered them. -->
<!-- Placeholder target since we're importing this into some non-c# projects as well. -->
<Target Name="ResolveAssemblyReferences" />
<!-- Define a default value so we can test items for the metadata without erroring -->
<ItemDefinitionGroup>
<_ResolvedProjectReferencePaths>
<CopyToOutputDirectory>Undefined</CopyToOutputDirectory>
</_ResolvedProjectReferencePaths>
</ItemDefinitionGroup>
<!-- Remove all items from _ResolvedProjectReferencePaths that have non-default value for CopyToOutputDirectory -->
<Target Name="Cleanup_ResolvedProjectReferencePaths"
BeforeTargets="ResolveAssemblyReferences"
Condition="'@(_ResolvedProjectReferencePaths)' != ''">
<Message Text="Before Cleanup_ResolvedProjectReferencePaths (CopyToOutputDirectory = %(CopyToOutputDirectory)): @(_ResolvedProjectReferencePaths)"
Importance="Low" />
<ItemGroup>
<_ResolvedProjectReferencePaths Condition="'%(CopyToOutputDirectory)' != 'Undefined'"
Remove="@(_ResolvedProjectReferencePaths)" />
</ItemGroup>
<Message Text="After Cleanup_ResolvedProjectReferencePaths (CopyToOutputDirectory = %(CopyToOutputDirectory)): @(_ResolvedProjectReferencePaths)"
Importance="Low" />
</Target>
<!-- END Workaround for MSBuild.exe bug that will be fixed in v4.5 -->
</Project>