-
Notifications
You must be signed in to change notification settings - Fork 168
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
56 lines (49 loc) · 2.44 KB
/
Directory.Build.props
File metadata and controls
56 lines (49 loc) · 2.44 KB
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
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<!-- VS 2026 Toolset -->
<PlatformToolset>v145</PlatformToolset>
<!-- Windows 11 SDK (pinned for reproducible builds) -->
<WindowsTargetPlatformVersion>10.0.22621.0</WindowsTargetPlatformVersion>
<!-- Security Features (PropertyGroup level) -->
<!-- Note: Spectre mitigated MFC libs may not be available for ARM64/ARM64EC -->
<SpectreMitigation Condition="'$(Platform)' != 'ARM64' AND '$(Platform)' != 'ARM64EC'">Spectre</SpectreMitigation>
<SpectreMitigation Condition="'$(Platform)' == 'ARM64' OR '$(Platform)' == 'ARM64EC'">false</SpectreMitigation>
<ControlFlowGuard>Guard</ControlFlowGuard>
<GuardEHContMetadata>true</GuardEHContMetadata>
<!-- Code Analysis - Lightweight by default -->
<EnableCppCoreCheck>true</EnableCppCoreCheck>
<CodeAnalysisRuleSet>CppCoreCheckRules.ruleset</CodeAnalysisRuleSet>
<!-- Code Analysis - Full when EnablePREfast=true (via command line /p:EnablePREfast=true) -->
<CodeAnalysisRuleSet Condition="'$(EnablePREfast)' == 'true'">AllRules.ruleset</CodeAnalysisRuleSet>
<EnableMicrosoftCodeAnalysis Condition="'$(EnablePREfast)' == 'true'">true</EnableMicrosoftCodeAnalysis>
<EnableClangTidyCodeAnalysis Condition="'$(EnablePREfast)' == 'true'">false</EnableClangTidyCodeAnalysis>
</PropertyGroup>
<!-- Compiler Settings - Quality & Security Baseline -->
<!-- CET (Control-flow Enforcement Technology) enabled by default, disabled for ARM64EC below -->
<ItemDefinitionGroup>
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
<LanguageStandard>stdcpplatest</LanguageStandard>
</ClCompile>
<Link>
<CETCompat>true</CETCompat>
</Link>
</ItemDefinitionGroup>
<!-- Prefast analysis settings when EnablePREfast=true -->
<!-- Warning policy: /WX already set globally treats analysis warnings as errors -->
<ItemDefinitionGroup Condition="'$(EnablePREfast)' == 'true'">
<ClCompile>
<EnablePREfast>true</EnablePREfast>
<AdditionalOptions>/analyze:max_paths 4 %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
</ItemDefinitionGroup>
<!-- Disable CET for ARM64/ARM64EC (not supported) -->
<ItemDefinitionGroup Condition="'$(Platform)' == 'ARM64' OR '$(Platform)' == 'ARM64EC'">
<Link>
<CETCompat>false</CETCompat>
</Link>
</ItemDefinitionGroup>
</Project>