mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-06 14:19:59 -05:00
Merge topic 'meta-feature_only_infer_granular_support'
613ac56e50Add a test to verify meta-feature parity with granular featuresb0f46c48f6CompileFeatures: Now able to presume full language level support646fb1a646CompileFeatures: memoize C++ compilers with full language level support0d641fcfadTests: Remove outdated portion of CompileFeatures genex test Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3176
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user