summaryrefslogtreecommitdiffstats
path: root/Tests/Module/WriteCompilerDetectionHeader
diff options
context:
space:
mode:
authorRobert Maynard <robert.maynard@kitware.com>2019-03-06 17:28:00 (GMT)
committerBrad King <brad.king@kitware.com>2019-04-09 12:44:56 (GMT)
commitb0f46c48f6e3efc0481d7c573f67cc76dfa5b2fd (patch)
tree2ea29adef53d0b0471e8a885a378cf6d47ceae2e /Tests/Module/WriteCompilerDetectionHeader
parent646fb1a646a3b860e983f3d030dfd223c761d49f (diff)
downloadCMake-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/Module/WriteCompilerDetectionHeader')
-rw-r--r--Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt12
1 files changed, 8 insertions, 4 deletions
diff --git a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt
index b584e16..cffef5a 100644
--- a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt
+++ b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt
@@ -52,8 +52,10 @@ endmacro()
# detailed features tables, not just meta-features
if (CMAKE_C_COMPILE_FEATURES)
- set(C_expected_features ${CMAKE_C_COMPILE_FEATURES})
- list(FILTER C_expected_features EXCLUDE REGEX "^c_std_[0-9][0-9]")
+ if(NOT CMAKE_C_COMPILER_ID MATCHES "^(Cray|PGI|XL|XLClang)$")
+ set(C_expected_features ${CMAKE_C_COMPILE_FEATURES})
+ list(FILTER C_expected_features EXCLUDE REGEX "^c_std_[0-9][0-9]")
+ endif()
endif()
if (C_expected_features)
string(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" COMPILER_VERSION_MAJOR "${CMAKE_C_COMPILER_VERSION}")
@@ -93,8 +95,10 @@ if (C_expected_features)
endif()
if (CMAKE_CXX_COMPILE_FEATURES)
- set(CXX_expected_features ${CMAKE_CXX_COMPILE_FEATURES})
- list(FILTER CXX_expected_features EXCLUDE REGEX "^cxx_std_[0-9][0-9]")
+ if(NOT CMAKE_CXX_COMPILER_ID MATCHES "^(Cray|PGI|XL|XLClang)$")
+ set(CXX_expected_features ${CMAKE_CXX_COMPILE_FEATURES})
+ list(FILTER CXX_expected_features EXCLUDE REGEX "^cxx_std_[0-9][0-9]")
+ endif()
endif()
if (NOT CXX_expected_features)
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp"