-
Notifications
You must be signed in to change notification settings - Fork 246
/
Directory.Build.Props
78 lines (62 loc) · 3.61 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
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Set common MSBuild properties and item metadata for CppWinRT tool and tests -->
<PropertyGroup>
<PlatformToolset>v143</PlatformToolset>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion>10.0.18362.0</WindowsTargetPlatformMinVersion>
</PropertyGroup>
<!--
Can be used as follows.
Compile with Visual C++:
msbuild /m /p:Configuration=Debug,Platform=x64 cppwinrt.sln
Compile with Clang:
msbuild /m /p:Configuration=Debug,Platform=x64,Clang=1 cppwinrt.sln
Optionally add /t:<project> to only build a given a solution project:
msbuild /m /p:Configuration=Debug,Platform=x64,Clang=1 cppwinrt.sln /t:cppwinrt
If you have deployed the LLVM toolset elsewhere, add its path to the configuration:
msbuild /m /p:Configuration=Debug,Platform=x64,Clang=1,LLVMToolsVersion=17.0.5,LLVMInstallDir=C:\llvm cppwinrt.sln
-->
<PropertyGroup Condition="'$(Clang)'=='1'">
<PlatformToolset>ClangCL</PlatformToolset>
<!-- The experimental coroutines aren't supported under Clang -->
<CppWinRTLanguageStandard>20</CppWinRTLanguageStandard>
<!-- Disable vcpkg autolink because it's not compatible with lld-link -->
<VcpkgAutoLink>false</VcpkgAutoLink>
</PropertyGroup>
<PropertyGroup>
<CppWinRTBuildVersion Condition="'$(CppWinRTBuildVersion)'==''">2.3.4.5</CppWinRTBuildVersion>
<CppWinRTPlatform>$(Platform)</CppWinRTPlatform>
<CppWinRTPlatform Condition="'$(Platform)'=='Win32'">x86</CppWinRTPlatform>
<OutDir>$(SolutionDir)_build\$(CppWinRTPlatform)\$(Configuration)\</OutDir>
<CppWinRTDir>$(OutDir)</CppWinRTDir>
<CppWinRTDir Condition="'$(Platform)'=='ARM64'">$(SolutionDir)_build\x86\$(Configuration)\</CppWinRTDir>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard Condition="'$(CppWinRTLanguageStandard)'==''">stdcpp17</LanguageStandard>
<LanguageStandard Condition="'$(CppWinRTLanguageStandard)'=='20'">stdcpp20</LanguageStandard>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<PreprocessorDefinitions>CPPWINRT_VERSION_STRING="$(CppWinRTBuildVersion)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(TestsUseAnsiColor)'=='1'">CATCH_CONFIG_COLOUR_ANSI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalOptions>/bigobj</AdditionalOptions>
<AdditionalOptions Condition="'$(CppWinRTLanguageStandard)'==''">/await %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(Clang)'=='1'">-Wno-unused-command-line-argument -fno-delayed-template-parsing -mcx16</AdditionalOptions>
</ClCompile>
<Link>
<AdditionalDependencies>onecore.lib</AdditionalDependencies>
</Link>
<ResourceCompile>
<PreprocessorDefinitions>CPPWINRT_VERSION_STRING="$(CppWinRTBuildVersion)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
</ItemDefinitionGroup>
<!-- Each release of Visual Studio produces larger intermediate files.
To prevent build agents from running out of disk space, clean as we go. -->
<Target Name="CleanIntermediateFiles" AfterTargets="Build" Condition="'$(clean_intermediate_files)'=='true'">
<RemoveDir Directories="$(IntDir)" />
</Target>
</Project>