Skip to content

Commit 5f46f56

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 5f46f56

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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)