summaryrefslogtreecommitdiff
path: root/Tests/CompileFeatures/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/CompileFeatures/CMakeLists.txt')
-rw-r--r--Tests/CompileFeatures/CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt
index bceb6bb123..ce5004bb42 100644
--- a/Tests/CompileFeatures/CMakeLists.txt
+++ b/Tests/CompileFeatures/CMakeLists.txt
@@ -3,6 +3,14 @@ cmake_minimum_required(VERSION 3.0)
project(CompileFeatures)
+if (NOT CMAKE_CXX_COMPILE_FEATURES)
+ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp"
+ "int main(int,char**) { return 0; }\n"
+ )
+ add_executable(CompileFeatures "${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp")
+ return()
+endif()
+
macro(run_test feature)
if (";${CMAKE_CXX_COMPILE_FEATURES};" MATCHES ${feature})
add_library(test_${feature} OBJECT ${feature}.cpp)