summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/target_compile_features/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/target_compile_features/cxx_not_enabled-result.txt1
-rw-r--r--Tests/RunCMake/target_compile_features/cxx_not_enabled-stderr.txt4
-rw-r--r--Tests/RunCMake/target_compile_features/cxx_not_enabled.cmake2
4 files changed, 8 insertions, 0 deletions
diff --git a/Tests/RunCMake/target_compile_features/RunCMakeTest.cmake b/Tests/RunCMake/target_compile_features/RunCMakeTest.cmake
index 33faf2b..1f67f11 100644
--- a/Tests/RunCMake/target_compile_features/RunCMakeTest.cmake
+++ b/Tests/RunCMake/target_compile_features/RunCMakeTest.cmake
@@ -11,3 +11,4 @@ run_cmake(not_a_cxx_feature)
run_cmake(no_matching_cxx_feature)
run_cmake(not_a_c_feature)
run_cmake(no_matching_c_feature)
+run_cmake(cxx_not_enabled)
diff --git a/Tests/RunCMake/target_compile_features/cxx_not_enabled-result.txt b/Tests/RunCMake/target_compile_features/cxx_not_enabled-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/target_compile_features/cxx_not_enabled-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/target_compile_features/cxx_not_enabled-stderr.txt b/Tests/RunCMake/target_compile_features/cxx_not_enabled-stderr.txt
new file mode 100644
index 0000000..4f707c7
--- /dev/null
+++ b/Tests/RunCMake/target_compile_features/cxx_not_enabled-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at cxx_not_enabled.cmake:[0-9]+ \(target_compile_features\):
+ target_compile_features cannot use features from non-enabled language CXX
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/target_compile_features/cxx_not_enabled.cmake b/Tests/RunCMake/target_compile_features/cxx_not_enabled.cmake
new file mode 100644
index 0000000..b7e9119
--- /dev/null
+++ b/Tests/RunCMake/target_compile_features/cxx_not_enabled.cmake
@@ -0,0 +1,2 @@
+add_executable(main empty.c)
+target_compile_features(main PRIVATE cxx_decltype)