build, msvc: Enable preprocessor conformance mode

See:
- https://learn.microsoft.com/en-us/cpp/build/reference/zc-preprocessor
- https://learn.microsoft.com/en-us/cpp/preprocessor/preprocessor-experimental-overview

Otherwise, the "traditional" MSVC preprocessor fails to parse the
`FUZZ_TARGET` and `DETAIL_FUZZ` macros because of behavior changes
highlighted in the docs mentioned above.
This commit is contained in:
Hennadii Stepanov 2024-04-18 10:27:12 +01:00
parent 09f5a74198
commit 4c078d7bd2
No known key found for this signature in database
GPG Key ID: 410108112E7EA81F

View File

@ -87,7 +87,7 @@
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<AdditionalOptions>/utf-8 /Zc:__cplusplus /std:c++20 %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions>/utf-8 /Zc:preprocessor /Zc:__cplusplus /std:c++20 %(AdditionalOptions)</AdditionalOptions>
<DisableSpecificWarnings>4018;4244;4267;4715;4805</DisableSpecificWarnings>
<TreatWarningAsError>true</TreatWarningAsError>
<PreprocessorDefinitions>_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING;SECP256K1_STATIC;ZMQ_STATIC;NOMINMAX;WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_CONSOLE;_WIN32_WINNT=0x0601;_WIN32_IE=0x0501;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>