From 333319acab3fc1944ba2a158564503a0ff2556dd Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Mon, 10 May 2021 13:59:52 +1000 Subject: [PATCH] CMake: Set __cplusplus version in MSVC --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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.