Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1ac88e81547..87557b6e905 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1571,6 +1571,12 @@ endif()
if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17")
+ # Make MSVC properly report the value of the __cplusplus preprocessor macro
+ # Available MSVC 15.7 (1914) and up, without this it reports 199711L regardless
+ # of the C++ standard chosen above
+ if(MSVC_VERSION GREATER 1913)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:__cplusplus")
+ endif()
elseif(
CMAKE_COMPILER_IS_GNUCC OR
CMAKE_C_COMPILER_ID MATCHES "Clang" OR