8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d403134 commit ba7d9c0Copy full SHA for ba7d9c0
CMakeLists.txt
@@ -906,8 +906,9 @@ elseif (MSVC)
906
if (VERBOSE)
907
message(STATUS "Compiler type MSVC: ${CMAKE_CXX_COMPILER}")
908
endif ()
909
-
910
- set(BASE_FLAGS "/wd4996 ${BASE_FLAGS}")
+# /Zc:__cplusplus
+# make MSVC correctly report the C++ version in __cplusplus; without it, it always reports 199711L (i.e. C++98).
911
+ set(BASE_FLAGS "/wd4996 /Zc:__cplusplus ${BASE_FLAGS}")
912
913
set(CMAKE_C_FLAGS "/MTd" CACHE INTERNAL "default C++ compiler flags")
914
set(CMAKE_C_FLAGS_DEBUG "/D _DEBUG /MTd /Zi /Ob0 /Od /RTC1 /bigobj" CACHE INTERNAL "C++ debug flags")
0 commit comments