Fix the WINRT_NO_MAKE_DETECTION build break (#8067)

C++/WinRT added a feature where it will detect a mismatch in some of its
build flags.

Because we build XAML projects and non-XAML projects, and try to link
them together in static libraries, we need those flags to always match.

C++/WinRT only respects this flag when `DEBUG` is set, so our CI missed
this.

With thanks to @carlos-zamora for letting me build/test/commit this on
his computer.
This commit is contained in:
Dustin L. Howett 2020-10-27 17:56:09 -07:00 committed by GitHub
parent 5a1c931f77
commit 6d44e0d651
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View file

@ -64,6 +64,10 @@
<!-- Manually disable unreachable code warning, because jconcpp has a ton of that. -->
<DisableSpecificWarnings>4702;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<!-- Many of our projects use XAML, which cannot handle make detection.
We cannot link static libs with differing values of WINRT_NO_MAKE_DETECTION, so let's force it for everyone. -->
<PreprocessorDefinitions>WINRT_NO_MAKE_DETECTION;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalDependencies>WindowsApp.lib;%(AdditionalDependencies)</AdditionalDependencies>

View file

@ -78,6 +78,10 @@
<DisableSpecificWarnings>28204;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<AdditionalUsingDirectories>$(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<!-- Many of our projects use XAML, which cannot handle make detection.
We cannot link static libs with differing values of WINRT_NO_MAKE_DETECTION, so let's force it for everyone. -->
<PreprocessorDefinitions>WINRT_NO_MAKE_DETECTION;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem Condition="'%(SubSystem)'==''">Console</SubSystem>