diff options
author | Brad King <brad.king@kitware.com> | 2017-01-26 15:40:47 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2017-01-26 15:40:47 (GMT) |
commit | b8db2ed79675930421ac96256d63af515e624d38 (patch) | |
tree | 3acc0cef5ef58b88d55e80e8dc149c63902c5150 | |
parent | 90ee3bd3b0b22c62cbb96334ba6620b89ea3d6be (diff) | |
parent | ef47272b075a2ad8018481d3fdfb6f2beb514056 (diff) | |
download | CMake-b8db2ed79675930421ac96256d63af515e624d38.zip CMake-b8db2ed79675930421ac96256d63af515e624d38.tar.gz CMake-b8db2ed79675930421ac96256d63af515e624d38.tar.bz2 |
Merge topic 'tests_auto_type'
ef47272b Tests: use cxx_auto_type only if actually available
-rw-r--r-- | Tests/CMakeCommands/target_compile_features/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/CompileFeatures/CMakeLists.txt | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/Tests/CMakeCommands/target_compile_features/CMakeLists.txt b/Tests/CMakeCommands/target_compile_features/CMakeLists.txt index 9b35f27..555a08f 100644 --- a/Tests/CMakeCommands/target_compile_features/CMakeLists.txt +++ b/Tests/CMakeCommands/target_compile_features/CMakeLists.txt @@ -26,7 +26,7 @@ if (CMAKE_C_COMPILE_FEATURES) target_link_libraries(restrict_user lib_restrict) endif() -if (CMAKE_CXX_COMPILE_FEATURES) +if (CMAKE_CXX_COMPILE_FEATURES AND ";${CMAKE_CXX_COMPILE_FEATURES};" MATCHES ";cxx_auto_type;") if (CMAKE_C_COMPILE_FEATURES) set(target_suffix _cxx) endif() diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt index 0405def..13aa86e 100644 --- a/Tests/CompileFeatures/CMakeLists.txt +++ b/Tests/CompileFeatures/CMakeLists.txt @@ -275,7 +275,10 @@ if (CMAKE_CXX_COMPILE_FEATURES) ) endif() endif() +endif () +# these tests only work if at least cxx_auto_type is available +if (";${CMAKE_CXX_COMPILE_FEATURES};" MATCHES ";cxx_auto_type;") add_executable(CompileFeatures main.cpp) set_property(TARGET CompileFeatures PROPERTY COMPILE_FEATURES "cxx_auto_type" |