Define __cplusplus according to C++ standard version on MSVC.

Otherwise, macros like KI_FALLTHROUGH are not defined properly.

(cherry picked from commit fa6dc95553)
This commit is contained in:
Alex Shvartzkop
2024-03-15 01:17:49 +03:00
parent e196f71d58
commit 4072bc05af
+2
View File
@@ -514,6 +514,8 @@ if( MSVC )
string( APPEND CMAKE_CXX_FLAGS " /wd4800" )
# /Zi: create PDB
string( APPEND CMAKE_CXX_FLAGS " /Zi" )
# /Zc:__cplusplus: define this macro according to C++ standard version
string( APPEND CMAKE_CXX_FLAGS " /Zc:__cplusplus" )
# /GF: enable string pooling
string( APPEND CMAKE_CXX_FLAGS_RELEASE " /GF" )
string( APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " /GF" )