Tests: Execute compile features tests unconditionally.

Conditionally create a dummy test if there are no known features.
This commit is contained in:
Stephen Kelly
2014-04-16 17:22:01 +02:00
parent 597bb72ed7
commit 447fbb3fac
3 changed files with 19 additions and 5 deletions
@@ -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)