1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

cmake: msvc: avoid having to use both preprocessor flags

https://github.com/warmcat/libwebsockets/issues/2600
This commit is contained in:
Scott Rankin 2022-04-05 05:54:29 +01:00 committed by Andy Green
parent a7f2e29881
commit 3268db0ae8

View file

@ -849,7 +849,11 @@ if (MSVC)
# Fail the build if any warnings
add_compile_options(/W3 /WX)
# Unbreak MSVC broken preprocessor __VA_ARGS__ behaviour
add_compile_options(/Zc:preprocessor /experimental:preprocessor /wd5105)
if (MSVC_VERSION GREATER 1925)
add_compile_options(/Zc:preprocessor /wd5105)
else()
add_compile_options(/experimental:preprocessor /wd5105)
endif()
endif(MSVC)
if (MINGW)