diff --git a/.github/external_ci/appveyor.yml b/.github/external_ci/appveyor.yml index 126ed99b3..5c6b47a34 100644 --- a/.github/external_ci/appveyor.yml +++ b/.github/external_ci/appveyor.yml @@ -41,7 +41,7 @@ environment: - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 configuration: Release platform: x86 - CXX_FLAGS: "/permissive- /std:c++latest /utf-8 /W4 /WX" + CXX_FLAGS: "/permissive- /std:c++17 /utf-8 /W4 /WX" CMAKE_OPTIONS: "" GENERATOR: Visual Studio 15 2017 @@ -62,7 +62,7 @@ environment: - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 configuration: Release platform: x64 - CXX_FLAGS: "/permissive- /std:c++latest /Zc:__cplusplus /utf-8 /W4 /WX" + CXX_FLAGS: "/permissive- /std:c++17 /Zc:__cplusplus /utf-8 /W4 /WX" CMAKE_OPTIONS: "" GENERATOR: Visual Studio 15 2017 diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 51342e51c..b1dc5df10 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -31,7 +31,7 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSIO unset(compiler_supports_cpp_17) endif() # MSVC 2015 (14.0) does not support C++17 -if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.1) +if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.10) unset(compiler_supports_cpp_17) endif() # GCC 5 and 6 do claim experimental support for C++17, but do not implement @@ -43,6 +43,10 @@ endif() if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0) unset(compiler_supports_cpp_20) endif() +# MSVC 2017 (15.x) does not support C++20 +if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.20) + unset(compiler_supports_cpp_20) +endif() # GCC started supporting C++20 features in 8.0 but a test for #3070 segfaults prior to 9.0 if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0) unset(compiler_supports_cpp_20)