CMake: Set __cplusplus version in MSVC

This commit is contained in:
Connor McLaughlin 2021-05-10 13:59:52 +10:00
parent 1392a64a93
commit 333319acab
1 changed files with 2 additions and 2 deletions

View File

@ -193,8 +193,8 @@ if(MSVC)
# Set warning level 3 instead of 4. # Set warning level 3 instead of 4.
string(REPLACE "/W3" "/W4" ${config} "${${config}}") string(REPLACE "/W3" "/W4" ${config} "${${config}}")
# Enable intrinsic functions, disable minimal rebuild, UTF-8 source. # Enable intrinsic functions, disable minimal rebuild, UTF-8 source, set __cplusplus version.
set(${config} "${${config}} /Oi /Gm- /utf-8") set(${config} "${${config}} /Oi /Gm- /utf-8 /Zc:__cplusplus")
endforeach() endforeach()
# RelWithDebInfo is set to Ob1 instead of Ob2. # RelWithDebInfo is set to Ob1 instead of Ob2.