summaryrefslogtreecommitdiffstats
path: root/Tests/CompileFeatures
diff options
context:
space:
mode:
authorRolf Eike Beer <eike@sf-mail.de>2017-01-25 20:00:30 (GMT)
committerRolf Eike Beer <eike@sf-mail.de>2017-01-25 20:00:30 (GMT)
commitef47272b075a2ad8018481d3fdfb6f2beb514056 (patch)
tree2723e9832320ac15ca0ae1ebaa877ccac174fec8 /Tests/CompileFeatures
parent014365ea97848654cc9493225399528f8b7b15b7 (diff)
downloadCMake-ef47272b075a2ad8018481d3fdfb6f2beb514056.zip
CMake-ef47272b075a2ad8018481d3fdfb6f2beb514056.tar.gz
CMake-ef47272b075a2ad8018481d3fdfb6f2beb514056.tar.bz2
Tests: use cxx_auto_type only if actually available
The presence of CMAKE_CXX_COMPILE_FEATURES doesn't mean cxx_auto_type is always available.
Diffstat (limited to 'Tests/CompileFeatures')
-rw-r--r--Tests/CompileFeatures/CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
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"