Skip to content

Commit 4c078d7

Browse files
committed
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.
1 parent 09f5a74 commit 4c078d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build_msvc/common.init.vcxproj.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
<ClCompile>
8888
<WarningLevel>Level3</WarningLevel>
8989
<PrecompiledHeader>NotUsing</PrecompiledHeader>
90-
<AdditionalOptions>/utf-8 /Zc:__cplusplus /std:c++20 %(AdditionalOptions)</AdditionalOptions>
90+
<AdditionalOptions>/utf-8 /Zc:preprocessor /Zc:__cplusplus /std:c++20 %(AdditionalOptions)</AdditionalOptions>
9191
<DisableSpecificWarnings>4018;4244;4267;4715;4805</DisableSpecificWarnings>
9292
<TreatWarningAsError>true</TreatWarningAsError>
9393
<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>

0 commit comments

Comments
 (0)