Skip to content

Commit 5f12f8c

Browse files
author
Richard Musil
committed
Drop C++ standard tests for MSVC versions which do not implement required features.
Signed-off-by: Richard Musil <[email protected]>
1 parent 350c400 commit 5f12f8c

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.github/external_ci/appveyor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ environment:
4141
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
4242
configuration: Release
4343
platform: x86
44-
CXX_FLAGS: "/permissive- /std:c++latest /utf-8 /W4 /WX"
44+
CXX_FLAGS: "/permissive- /std:c++17 /utf-8 /W4 /WX"
4545
CMAKE_OPTIONS: ""
4646
GENERATOR: Visual Studio 15 2017
4747

@@ -62,7 +62,7 @@ environment:
6262
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
6363
configuration: Release
6464
platform: x64
65-
CXX_FLAGS: "/permissive- /std:c++latest /Zc:__cplusplus /utf-8 /W4 /WX"
65+
CXX_FLAGS: "/permissive- /std:c++17 /Zc:__cplusplus /utf-8 /W4 /WX"
6666
CMAKE_OPTIONS: ""
6767
GENERATOR: Visual Studio 15 2017
6868

tests/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSIO
3131
unset(compiler_supports_cpp_17)
3232
endif()
3333
# MSVC 2015 (14.0) does not support C++17
34-
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.1)
34+
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.10)
3535
unset(compiler_supports_cpp_17)
3636
endif()
3737
# GCC 5 and 6 do claim experimental support for C++17, but do not implement <optional>
@@ -43,6 +43,10 @@ endif()
4343
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)
4444
unset(compiler_supports_cpp_20)
4545
endif()
46+
# MSVC 2017 (15.x) does not support C++20
47+
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.20)
48+
unset(compiler_supports_cpp_20)
49+
endif()
4650
# GCC started supporting C++20 features in 8.0 but a test for #3070 segfaults prior to 9.0
4751
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)
4852
unset(compiler_supports_cpp_20)

0 commit comments

Comments
 (0)