set visual studio flags to accurately report and use latest c++ features.

This commit is contained in:
greg
2020-03-28 14:24:22 -04:00
parent 5542475554
commit 1a0fdbf3f3
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -125,7 +125,7 @@ if (PHMAP_BUILD_EXAMPLES)
if(NOT MSVC) if(NOT MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Wcast-align -Wcast-qual -Wdisabled-optimization -Winit-self -Wlogical-op -Wmissing-include-dirs -Woverloaded-virtual -Wredundant-decls -Wshadow -Wstrict-null-sentinel -Wswitch-default -Wno-unused -Wno-unknown-warning-option -Wno-gnu-zero-variadic-macro-arguments") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Wcast-align -Wcast-qual -Wdisabled-optimization -Winit-self -Wlogical-op -Wmissing-include-dirs -Woverloaded-virtual -Wredundant-decls -Wshadow -Wstrict-null-sentinel -Wswitch-default -Wno-unused -Wno-unknown-warning-option -Wno-gnu-zero-variadic-macro-arguments")
else() else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /Zc:__cplusplus /std:c++latest")
endif() endif()
set(THREADS_PREFER_PTHREAD_FLAG ON) set(THREADS_PREFER_PTHREAD_FLAG ON)
+1 -1
View File
@@ -26,7 +26,7 @@ function(phmap_cc_test)
) )
if(MSVC) if(MSVC)
target_compile_options(${_NAME} target_compile_options(${_NAME}
PRIVATE ${PHMAP_CC_TEST_CWOPTS} /W4 PRIVATE ${PHMAP_CC_TEST_CWOPTS} /W4 /Zc:__cplusplus /std:c++latest
) )
else() else()
target_compile_options(${_NAME} target_compile_options(${_NAME}