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:
parent
e196f71d58
commit
4072bc05af
|
@ -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