Drop C++ standard tests for compilers which do not implement required features.
Signed-off-by: Richard Musil <risa2000x@gmail.com>
This commit is contained in:
parent
7974976894
commit
350c40029a
@ -21,6 +21,11 @@ include(test)
|
|||||||
# override standard support
|
# override standard support
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
||||||
|
# Clang only supports C++14 starting from Clang 3.5 (lesser versions miss std::enable_if_t)
|
||||||
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5)
|
||||||
|
unset(compiler_supports_cpp_14)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Clang only supports C++17 starting from Clang 5.0
|
# Clang only supports C++17 starting from Clang 5.0
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
|
||||||
unset(compiler_supports_cpp_17)
|
unset(compiler_supports_cpp_17)
|
||||||
@ -29,6 +34,10 @@ endif()
|
|||||||
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.1)
|
||||||
unset(compiler_supports_cpp_17)
|
unset(compiler_supports_cpp_17)
|
||||||
endif()
|
endif()
|
||||||
|
# GCC 5 and 6 do claim experimental support for C++17, but do not implement <optional>
|
||||||
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0)
|
||||||
|
unset(compiler_supports_cpp_17)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Clang C++20 support appears insufficient prior to Clang 9.0 (based on CI build failure)
|
# Clang C++20 support appears insufficient prior to Clang 9.0 (based on CI build failure)
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user