From 1a0fdbf3f317fbe0519ff6ac986de3185b4dbcfa Mon Sep 17 00:00:00 2001 From: greg Date: Sat, 28 Mar 2020 14:24:22 -0400 Subject: [PATCH] set visual studio flags to accurately report and use latest c++ features. --- CMakeLists.txt | 2 +- cmake/helpers.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d6fd019..16c7756 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,7 +125,7 @@ if (PHMAP_BUILD_EXAMPLES) 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") else() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /Zc:__cplusplus /std:c++latest") endif() set(THREADS_PREFER_PTHREAD_FLAG ON) diff --git a/cmake/helpers.cmake b/cmake/helpers.cmake index 31109ea..b290066 100644 --- a/cmake/helpers.cmake +++ b/cmake/helpers.cmake @@ -26,7 +26,7 @@ function(phmap_cc_test) ) if(MSVC) target_compile_options(${_NAME} - PRIVATE ${PHMAP_CC_TEST_CWOPTS} /W4 + PRIVATE ${PHMAP_CC_TEST_CWOPTS} /W4 /Zc:__cplusplus /std:c++latest ) else() target_compile_options(${_NAME}