diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2019-03-06 17:28:00 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-04-09 12:44:56 (GMT) |
commit | b0f46c48f6e3efc0481d7c573f67cc76dfa5b2fd (patch) | |
tree | 2ea29adef53d0b0471e8a885a378cf6d47ceae2e /Tests/CompileFeatures | |
parent | 646fb1a646a3b860e983f3d030dfd223c761d49f (diff) | |
download | CMake-b0f46c48f6e3efc0481d7c573f67cc76dfa5b2fd.zip CMake-b0f46c48f6e3efc0481d7c573f67cc76dfa5b2fd.tar.gz CMake-b0f46c48f6e3efc0481d7c573f67cc76dfa5b2fd.tar.bz2 |
CompileFeatures: Now able to presume full language level support
Previously compilers that only supported the meta-level flags
would not have any of the granular features listed. Now we
presume that they have full support and enable all the features.
Update granular feature tests to skip the actual compilation
checks for the presumed features.
Diffstat (limited to 'Tests/CompileFeatures')
-rw-r--r-- | Tests/CompileFeatures/CMakeLists.txt | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt index 6ccdcc3..2dd8917 100644 --- a/Tests/CompileFeatures/CMakeLists.txt +++ b/Tests/CompileFeatures/CMakeLists.txt @@ -15,17 +15,21 @@ macro(run_test feature lang) endif() endmacro() -get_property(c_features GLOBAL PROPERTY CMAKE_C_KNOWN_FEATURES) -list(FILTER c_features EXCLUDE REGEX "^c_std_[0-9][0-9]") -foreach(feature ${c_features}) - run_test(${feature} C) -endforeach() +if(NOT CMAKE_C_COMPILER_ID MATCHES "^(Cray|PGI|XL|XLClang)$") + get_property(c_features GLOBAL PROPERTY CMAKE_C_KNOWN_FEATURES) + list(FILTER c_features EXCLUDE REGEX "^c_std_[0-9][0-9]") + foreach(feature ${c_features}) + run_test(${feature} C) + endforeach() +endif() -get_property(cxx_features GLOBAL PROPERTY CMAKE_CXX_KNOWN_FEATURES) -list(FILTER cxx_features EXCLUDE REGEX "^cxx_std_[0-9][0-9]") -foreach(feature ${cxx_features}) - run_test(${feature} CXX) -endforeach() +if(NOT CMAKE_CXX_COMPILER_ID MATCHES "^(Cray|PGI|XL|XLClang)$") + get_property(cxx_features GLOBAL PROPERTY CMAKE_CXX_KNOWN_FEATURES) + list(FILTER cxx_features EXCLUDE REGEX "^cxx_std_[0-9][0-9]") + foreach(feature ${cxx_features}) + run_test(${feature} CXX) + endforeach() +endif() if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.1) |