summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r--Tests/RunCMake/target_sources/FileSetBadName-result.txt1
-rw-r--r--Tests/RunCMake/target_sources/FileSetBadName-stderr.txt6
-rw-r--r--Tests/RunCMake/target_sources/FileSetBadName.cmake4
-rw-r--r--Tests/RunCMake/target_sources/RunCMakeTest.cmake1
4 files changed, 12 insertions, 0 deletions
diff --git a/Tests/RunCMake/target_sources/FileSetBadName-result.txt b/Tests/RunCMake/target_sources/FileSetBadName-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/target_sources/FileSetBadName-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/target_sources/FileSetBadName-stderr.txt b/Tests/RunCMake/target_sources/FileSetBadName-stderr.txt
new file mode 100644
index 0000000..a0b8054
--- /dev/null
+++ b/Tests/RunCMake/target_sources/FileSetBadName-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Error at FileSetBadName\.cmake:[0-9]+ \(target_sources\):
+ target_sources Non-default file set name must contain only letters,
+ numbers, and underscores, and must not start with a capital letter or
+ underscore
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/target_sources/FileSetBadName.cmake b/Tests/RunCMake/target_sources/FileSetBadName.cmake
new file mode 100644
index 0000000..325843f
--- /dev/null
+++ b/Tests/RunCMake/target_sources/FileSetBadName.cmake
@@ -0,0 +1,4 @@
+enable_language(C)
+
+add_library(lib1 STATIC empty.c)
+target_sources(lib1 INTERFACE FILE_SET a+ TYPE HEADERS)
diff --git a/Tests/RunCMake/target_sources/RunCMakeTest.cmake b/Tests/RunCMake/target_sources/RunCMakeTest.cmake
index da9944d..d23bce1 100644
--- a/Tests/RunCMake/target_sources/RunCMakeTest.cmake
+++ b/Tests/RunCMake/target_sources/RunCMakeTest.cmake
@@ -39,6 +39,7 @@ run_cmake(FileSetNoExistInterface)
run_cmake(FileSetNoExistInstall)
run_cmake(FileSetDirectories)
run_cmake(FileSetCustomTarget)
+run_cmake(FileSetBadName)
set(RunCMake_TEST_OPTIONS -DCMAKE_POLICY_DEFAULT_CMP0115=NEW)
run_cmake(FileSetFileNoExist)