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
|
<?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)build\bin\$(Platform)\$(Configuration)\</OutDir>
<OutDir Condition="'$(Platform)'=='Win32'">$(MSBuildThisFileDirectory)build\bin\x86\$(Configuration)\</OutDir>
<!-- C++ temp files can be redirected. -->
<IntDir>$(MSBuildThisFileDirectory)build\intermediate\$(MSBuildProjectName)\$(Platform)\$(Configuration)\</IntDir>
<IntDir Condition="'$(Platform)'=='Win32'">$(MSBuildThisFileDirectory)build\intermediate\$(MSBuildProjectName)\x86\$(Configuration)\</IntDir>
<!-- The C runtime is provided by the OS on the Windows platform (Universal C Runtime (CRT)) -->
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<!-- Default Windows API character set is Unicode (UTF16), defines _UNICODE and UNICODE. -->
<CharacterSet>Unicode</CharacterSet>
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)default.ruleset</CodeAnalysisRuleSet>
<VcpkgConfiguration Condition="'$(Configuration)' == 'Checked'">Debug</VcpkgConfiguration>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<!-- To ensure high quality C++ code use Warning level 4 and treat warnings as errors to ensure warnings are fixed promptly. -->
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<UseFullPaths>true</UseFullPaths>
<!-- Explicit disable warnings from external files (Supported since Visual Studio 2019 16.10) -->
<ExternalWarningLevel>TurnOffAllWarnings</ExternalWarningLevel>
<!-- For development purposes, All warnings can be used to discover useful compiler warnings.
This requires also that some warnings need to be disabled from this all warning list. -->
<WarningLevel Condition="'$(CHARLS_ALL_WARNINGS)'!=''">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 [Handled by default case]
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. [Just informational]
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]
C4623 = derived class`' : default constructor was implicitly defined as deleted because a base class default constructor is inaccessible or deleted [Just informational]
C4625 = derived class' : copy constructor was implicitly defined as deleted because a base class copy constructor is inaccessible or deleted [Just informational]
C4626 = derived class' : assignment operator was implicitly defined as deleted because a base class assignment operator is inaccessible or deleted [Just informational]
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]
C4820 = bytes' bytes padding added after construct 'member_name' [Just informational]
C5026 = 'type': move constructor was implicitly defined as deleted [Just informational]
C5027 = 'type': move assignment operator was implicitly defined as deleted [Just informational]
C5045 = Compiler will insert Spectre mitigation for memory load if /Qspectre switch specified [Just informational]
C5264 = 'const' variable is not used [reported for const in header files]
C5258 = explicit capture of '' is not required for this use [VS 2019 requires capture of constexpr]
-->
<DisableSpecificWarnings Condition="'$(CHARLS_ALL_WARNINGS)'!=''">4061;4365;4464;4514;4571;4623;4625;4626;4710;4711;4738;4820;5026;5027;5045;5264;5258</DisableSpecificWarnings>
<!--
__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)</AdditionalOptions>
<!-- Use all cores to speed up the compilation (MS recommended best practice). -->
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<!-- Explicit define that all projects are compiled according the latest offical C++14 standard -->
<LanguageStandard>stdcpp14</LanguageStandard>
<!-- Explicit disable non conforming MSVC compiler options that are not compatible with the C++ standard -->
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)include</AdditionalIncludeDirectories>
<!-- Use by default precompiled headers with the modern name pch.h -->
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<!-- For checked builds, enable the MS static analyzer build into the compiler. -->
<EnablePREfast Condition="'$(Configuration)'=='Checked'">true</EnablePREfast>
<DiagnosticsFormat>Caret</DiagnosticsFormat>
<!-- Enables recommended Security Development Lifecycle (SDL) checks.
This checks consist of compile-time checks and runtime checks. -->
<SDLCheck>true</SDLCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
<!-- use FULL debug info to ensure code coverage works out of the box. -->
<GenerateDebugInformation>DebugFull</GenerateDebugInformation>
</Link>
<ResourceCompile>
<AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)include</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug' OR '$(Configuration)'=='Checked'">
<UseDebugLibraries>true</UseDebugLibraries>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug' OR '$(Configuration)'=='Checked'">
<ClCompile>
<Optimization>Disabled</Optimization>
</ClCompile>
<Link>
<RandomizedBaseAddress Condition="'$(Platform)'!='ARM64'">false</RandomizedBaseAddress>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Checked'">
<ClCompile>
<!-- Clang-tidy generates false clang-diagnostic-unused-command-line-argument warnings, use not all options.-->
<AdditionalOptions>/Zc:__cplusplus /utf-8 /ZH:SHA_256</AdditionalOptions>
</ClCompile>
</ItemDefinitionGroup>
<PropertyGroup Condition="'$(Configuration)'=='Checked'">
<RunCodeAnalysis Condition="'$(MSBuildProjectExtension)'=='.vcxproj'" >true</RunCodeAnalysis>
<EnableCppCoreCheck>true</EnableCppCoreCheck>
<!-- Latest clang-tidy crashes during Win32 builds and clang-tidy doesn't run on ARM64 platform. -->
<EnableClangTidyCodeAnalysis Condition="'$(Platform)'!='Win32' AND '$(Platform)'!='ARM64'">true</EnableClangTidyCodeAnalysis>
<EnableMicrosoftCodeAnalysis>true</EnableMicrosoftCodeAnalysis>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<UseDebugLibraries>false</UseDebugLibraries>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ControlFlowGuard>Guard</ControlFlowGuard>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<LinkIncremental>false</LinkIncremental>
<!-- Store only the filename of the PDB file into the .exe/.dll for deterministic builds. -->
<AdditionalOptions>/PDBALTPATH:%_PDB% %(AdditionalOptions)</AdditionalOptions>
<!-- The MSVC C++ compiler has experimental support to create deterministic builds. Make it a build option. -->
<AdditionalOptions Condition="'$(CHARLS_DETERMINISTIC_BUILD)'=='true'">/experimental:deterministic %(AdditionalOptions)</AdditionalOptions>
<!-- Mark executable image compatible with the Control-flow Enforcement Technology (CET) Shadow Stack. -->
<CETCompat Condition="'$(Platform)'!='ARM64'">true</CETCompat>
<!-- On the ARM64 plaftorm enable Pointer Authentication for return addresses. -->
<GuardSignedReturns Condition="'$(Platform)'=='ARM64'">true</GuardSignedReturns>
</Link>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
</ItemDefinitionGroup>
</Project>
|