8000 Try to make MSVC work · arangodb/arangodb@ba7d9c0 · GitHub
[go: up one dir, main page]

Skip to content

Commit ba7d9c0

Browse files
committed
Try to make MSVC work
1 parent d403134 commit ba7d9c0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -906,8 +906,9 @@ elseif (MSVC)
906906
if (VERBOSE)
907907
message(STATUS "Compiler type MSVC: ${CMAKE_CXX_COMPILER}")
908908
endif ()
909-
910-
set(BASE_FLAGS "/wd4996 ${BASE_FLAGS}")
909+
# /Zc:__cplusplus
910+
# 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}")
911912

912913
set(CMAKE_C_FLAGS "/MTd" CACHE INTERNAL "default C++ compiler flags")
913914
set(CMAKE_C_FLAGS_DEBUG "/D _DEBUG /MTd /Zi /Ob0 /Od /RTC1 /bigobj" CACHE INTERNAL "C++ debug flags")

0 commit comments

Comments
 (0)
0