summaryrefslogtreecommitdiff
path: root/Tests/CMakeCommands
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-04-16 17:22:01 +0200
committerStephen Kelly <steveire@gmail.com>2014-04-17 16:20:50 +0200
commit447fbb3facd09a29a2a402df258acf01cbf0bc34 (patch)
treef0a98cea28393e1e60728cc90613574de039b68c /Tests/CMakeCommands
parent597bb72ed7a74bf9b70dec8726113050e731d667 (diff)
downloadcmake-447fbb3facd09a29a2a402df258acf01cbf0bc34.tar.gz
Tests: Execute compile features tests unconditionally.
Conditionally create a dummy test if there are no known features.
Diffstat (limited to 'Tests/CMakeCommands')
-rw-r--r--Tests/CMakeCommands/target_compile_features/CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/Tests/CMakeCommands/target_compile_features/CMakeLists.txt b/Tests/CMakeCommands/target_compile_features/CMakeLists.txt
index ad76411a64..62e3ce0b70 100644
--- a/Tests/CMakeCommands/target_compile_features/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_compile_features/CMakeLists.txt
@@ -1,6 +1,14 @@
cmake_minimum_required(VERSION 3.0)
project(target_compile_features)
+if (NOT CMAKE_CXX_COMPILE_FEATURES)
+ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/test_dummy.cpp"
+ "int main(int,char**) { return 0; }\n"
+ )
+ add_executable(target_compile_features "${CMAKE_CURRENT_BINARY_DIR}/test_dummy.cpp")
+ return()
+endif()
+
set(CMAKE_VERBOSE_MAKEFILE ON)
add_executable(target_compile_features main.cpp)