Define __cplusplus according to C++ standard version on MSVC.
Otherwise, macros like KI_FALLTHROUGH are not defined properly.
This commit is contained in:
parent
16953edf6d
commit
fa6dc95553
|
@ -514,6 +514,8 @@ if( MSVC )
|
||||||
string( APPEND CMAKE_CXX_FLAGS " /wd4800" )
|
string( APPEND CMAKE_CXX_FLAGS " /wd4800" )
|
||||||
# /Zi: create PDB
|
# /Zi: create PDB
|
||||||
string( APPEND CMAKE_CXX_FLAGS " /Zi" )
|
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
|
# /GF: enable string pooling
|
||||||
string( APPEND CMAKE_CXX_FLAGS_RELEASE " /GF" )
|
string( APPEND CMAKE_CXX_FLAGS_RELEASE " /GF" )
|
||||||
string( APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " /GF" )
|
string( APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " /GF" )
|
||||||
|
|
Loading…
Reference in New Issue