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