File tree Expand file tree Collapse file tree 3 files changed +14
-7
lines changed
Expand file tree Collapse file tree 3 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ foreach ($header in $allHeaders)
2020{
2121 $chunks = $header.FullName.Split (" \\" );
2222 $header = $chunks [$chunks.Length - 1 ];
23- $generatedPchContent += " #include `" winrt/$header `" `r`n" ;
23+ $generatedPchContent += " #include < winrt/$header > `r`n " ;
2424}
2525
2626Set-Content - Path " $generatedFilesDir \\pch.h" - Value $generatedPchContent - Force - Encoding UTF8
Original file line number Diff line number Diff line change @@ -9,5 +9,9 @@ int main()
99 winrt::Windows::Foundation::Uri uri{ L" https://www.microsoft.com" };
1010 const auto asString = uri.ToString ();
1111
12+ // Cause the "if constexpr" block to be reachable, possibly triggering a build warning.
13+ winrt::Windows::Networking::Sockets::StreamWebSocket socket{ nullptr };
14+ socket.Close (1000 , L" " );
15+
1216 return 0 ;
1317}
Original file line number Diff line number Diff line change 4040 <CppWinRTPackageDir >..\_build\$(Platform)\$(Configuration)</CppWinRTPackageDir >
4141 <CppWinRTPackage >false</CppWinRTPackage >
4242 <!-- Null out CAExcludePath so that the include files are not automatically excluded from analysis. -->
43- <!-- <CAExcludePath></CAExcludePath> -->
44- <!-- <RunCodeAnalysis>true</RunCodeAnalysis> -->
43+ <CAExcludePath >
44+ </CAExcludePath >
45+ <RunCodeAnalysis >true</RunCodeAnalysis >
4546 </PropertyGroup >
4647 <Import Project =" $(VCTargetsPath)\Microsoft.Cpp.Default.props" />
4748 <PropertyGroup Condition =" '$(Configuration)'=='Debug'" Label =" Configuration" >
5556 <ItemDefinitionGroup >
5657 <ClCompile >
5758 <AdditionalIncludeDirectories >$(OutputPath);Generated Files;..;..\..\cppwinrt</AdditionalIncludeDirectories >
59+ <CodeAnalysisRuleSet >AllRules.ruleset</CodeAnalysisRuleSet >
5860 <TreatWarningAsError >true</TreatWarningAsError >
59- <!-- <ExternalWarningLevel>Level4</ExternalWarningLevel> -->
60- <!-- <ExternalTemplatesDiagnostics>true</ExternalTemplatesDiagnostics> -->
61- <!-- <AnalyzeExternalRuleset>NativeRecommendedRules.ruleset</AnalyzeExternalRuleset> -->
61+ <ExternalWarningLevel >Level4</ExternalWarningLevel >
62+ <ExternalTemplatesDiagnostics >true</ExternalTemplatesDiagnostics >
63+ <AnalyzeExternalRuleset >AllRules.ruleset</AnalyzeExternalRuleset >
64+ <AdditionalOptions >%(AdditionalOptions) /Wv:19.40</AdditionalOptions >
65+ <EnablePREfast >true</EnablePREfast >
6266 </ClCompile >
6367 <Link >
6468 <SubSystem >Console</SubSystem >
6569 </Link >
6670 <PreBuildEvent >
67- <!-- <Command>$(CppWinRTDir)cppwinrt -in $(OutputPath)test_component.winmd $(OutputPath)test_component_no_pch.winmd -out "$(ProjectDir)Generated Files" -ref sdk -verbose</Command> -->
6871 <Command >powershell.exe -NoProfile -NonInteractive -File "$(ProjectDir)GeneratePrecompiledHeader.ps1" -generatedFilesDir "$(ProjectDir)Generated Files" -cppwinrtHeaderFolder "$(CppWinRTDir)\winrt"</Command >
6972 </PreBuildEvent >
7073 </ItemDefinitionGroup >
You can’t perform that action at this time.
0 commit comments