-
Notifications
You must be signed in to change notification settings - Fork 7
/
Directory.Build.props
136 lines (117 loc) · 7.58 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
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
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- Build to a folder outside the source folders, making it easier to clean. -->
<OutDir>$(MSBuildThisFileDirectory)bin\$(Configuration)\$(Platform)\</OutDir>
<!-- C++ temp files can be redirected. -->
<IntDir>$(MSBuildThisFileDirectory)intermediate\$(MSBuildProjectName)\$(Platform)\$(Configuration)\</IntDir>
<WindowsTargetPlatformVersion>10</WindowsTargetPlatformVersion>
<!-- Default character set is Unicode (UTF16), defines _UNICODE and UNICODE. -->
<CharacterSet>Unicode</CharacterSet>
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)default.ruleset</CodeAnalysisRuleSet>
<!-- Assist VC package manager which configuration to use (checked is debug+static checking) -->
<VcpkgConfiguration Condition="'$(Configuration)' == 'Checked'">Debug</VcpkgConfiguration>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<!-- Use all cores to speed up the compilation (MS recommended best practice). -->
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<!-- Explicit define that all projects are compiled according the C++17 standard -->
<LanguageStandard>stdcpp17</LanguageStandard>
<!-- Explicit disable non conforming MSVC compiler options that are not compatible with the C++ standard -->
<ConformanceMode>true</ConformanceMode>
<WarningLevel>Level4</WarningLevel>
<ExternalWarningLevel>TurnOffAllWarnings</ExternalWarningLevel> <!-- Explicit set the 'external' warning level to W0 (Supported since Visual Studio 2019 16.10) -->
<TreatWarningAsError>true</TreatWarningAsError> <!-- Treat warnings as errors to ensure warnings are fixed promptly. -->
<!--
__cplusplus = Use the correct value for the __cplusplus macro
throwingNew = Communicate with the compiler that only the throwing variant of operator new is used.
utf-8 = interpret all source files as UTF-8 (Required as MSVC relies on UTF-8 signature, which is not used)
ZH:SHA_256 = Use an SHA-256 hash for the checksum.in debug info
-->
<AdditionalOptions>/Zc:__cplusplus /Zc:throwingNew /utf-8 /ZH:SHA_256</AdditionalOptions>
<!-- To ensure high quality C++ code use Warning level All in checked builds. -->
<WarningLevel Condition="'$(Configuration)'=='Checked'">EnableAllWarnings</WarningLevel>
<!--
Disable level All warnings that are not useful:
C4061 = enumerator 'identifier' in switch of enum 'enumeration' is not explicitly handled by a case label
C4191 = operator/operation' : unsafe conversion from 'type of expression' to 'type required'
C4263 = function' : member function does not override any base class virtual member function
C4264 = virtual_function' : no override available for virtual member function from base 'class'; function is hidden
C4265 = class' : class has virtual functions, but destructor is not virtual
C4266 = function' : no override available for virtual member function from base 'type'; function is hidden
C4365 = action' : conversion from 'type_1' to 'type_2', signed/unsigned mismatch
C4464 = A #include directive has a path that includes a '..' parent directory specifier.
C4514 = function' : unreferenced inline function has been removed [Just informational]
C4571 = Informational: catch(...) semantics changed since Visual C++ 7.1; structured exceptions (SEH) are no longer caught [Just informational]
C4599 = 'flag path': command line argument number number does not match precompiled header
C4623 = derived class`' : default constructor was implicitly defined as deleted because a base class default constructor is inaccessible or deleted
C4625 = derived class' : copy constructor was implicitly defined as deleted because a base class copy constructor is inaccessible or deleted
C4626 = derived class' : assignment operator was implicitly defined as deleted because a base class assignment operator is inaccessible or deleted
C4668 = symbol' is not defined as a preprocessor macro, replacing with '0' for 'directives'
C4710 = function '' function not inlined [Just informational]
C4711 = function '' selected for automatic inline expansion [Just informational]
C4738 = storing 32-bit float result in memory, possible loss of performance [Just informational]
C4774 = ‘<function>’ : format string expected in argument <position> is not a string literal
C4820 = bytes' bytes padding added after construct 'member_name' [Just informational]
C5026 = 'type': move constructor was implicitly defined as deleted
C5027 = 'type': move assignment operator was implicitly defined as deleted
C5039 = 'function': pointer or reference to potentially throwing function passed to extern C function under -EHc.
C5042 = 'declaration': function declarations at block scope cannot be specified 'inline' in standard C++; remove 'inline' specifier
C5045 = Compiler will insert Spectre mitigation for memory load if /Qspectre switch specified
-->
<AdditionalOptions Condition="'$(Configuration)'=='Checked'">
/wd4061 /wd4191
/wd4263 /wd4264 /wd4265 /wd4266
/wd4365
/wd4464
/wd4514 /wd4571 /wd4599
/wd4623 /wd4625 /wd4626 /wd4668
/wd4710 /wd4711 /wd4738 /wd4774 /wd4820
/wd5026 /wd5027 /wd5039 /wd5042 /wd5045
%(AdditionalOptions)
</AdditionalOptions>
<!--
NOMINMAX = Prevent that the Windows SDK header files define the macros min and max.
_ATL_EX_CONVERSION_MACROS_ONLY = Only use the new ATL Unicode <-> Ansi conversion macro's.
_ATL_CSTRING_EXPLICIT_CONSTRUCTORS = Some CString constructors will be explicit, prevent incorrect implicitly usage.
_ATL_ENABLE_PTM_WARNING = Enabled ATL PTM (pointer to a class member function ) warnings.
_ATL_NO_AUTOMATIC_NAMESPACE = Prevent 'using namespace ATL' in header (bad style).
_ATL_NO_HOSTING = will prevent that ATL headers including mshtml.h, which is not strictStrings compatible.
-->
<PreprocessorDefinitions>
WIN32;
_WINDOWS;
WIN32_LEAN_AND_MEAN;
NOMINMAX;
_ATL_EX_CONVERSION_MACROS_ONLY;
_ATL_CSTRING_EXPLICIT_CONSTRUCTORS;
_ATL_ALL_WARNINGS;
_ATL_ALL_USER_WARNINGS;
_ATL_ENABLE_PTM_WARNING;
_ATL_NO_AUTOMATIC_NAMESPACE;
_ATL_CCOMBSTR_EXPLICIT_CONSTRUCTORS;
_ATL_NO_HOSTING;
_CSTRING_DISABLE_NARROW_WIDE_CONVERSION;
%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<!-- Use by default precompiled headers with the modern name pch.h -->
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<PrecompiledHeader>Use</PrecompiledHeader>
<AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<ResourceCompile>
<AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)/include</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
<PropertyGroup Condition="'$(Configuration)'=='Checked'">
<LinkIncremental>true</LinkIncremental>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Checked'">
<ClCompile>
<!-- For checked builds, enable the MS static analyzer build into the compiler. -->
<EnablePREfast>true</EnablePREfast>
</ClCompile>
</ItemDefinitionGroup>
</Project>