summaryrefslogtreecommitdiffstats
path: root/Tests/SourceGroups
diff options
context:
space:
mode:
authorMateusz Janek <stryku2393@gmail.com>2019-04-25 18:51:40 (GMT)
committerMateusz Janek <stryku2393@gmail.com>2019-04-25 18:51:40 (GMT)
commit8d93815d204b4827ff9f1280a73e55861c00f47c (patch)
treef4750239df90dec60c730463974d93602e225cd7 /Tests/SourceGroups
parent4ccf40e61e02cffb28b549a3de6f4794ea3e3d92 (diff)
downloadCMake-8d93815d204b4827ff9f1280a73e55861c00f47c.zip
CMake-8d93815d204b4827ff9f1280a73e55861c00f47c.tar.gz
CMake-8d93815d204b4827ff9f1280a73e55861c00f47c.tar.bz2
source_group command ensures that FILES arguments are actually files
Diffstat (limited to 'Tests/SourceGroups')
-rw-r--r--Tests/SourceGroups/CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/Tests/SourceGroups/CMakeLists.txt b/Tests/SourceGroups/CMakeLists.txt
index 813774d..a5740bb 100644
--- a/Tests/SourceGroups/CMakeLists.txt
+++ b/Tests/SourceGroups/CMakeLists.txt
@@ -42,8 +42,16 @@ set(tree_files_with_prefix ${root}/tree_prefix_foo.c
set(tree_files_with_empty_prefix ${root}/tree_empty_prefix_foo.c
tree_empty_prefix_bar.c)
+set(tree_files_which_are_actually_directories ${root}
+ ${root}/
+ ${root}/sub1
+ ${root}/sub1/)
+
source_group(TREE ${root} FILES ${tree_files_without_prefix})
+# Should not crash and not add any files - just silently ignore the directories
+source_group(TREE ${root} FILES ${tree_files_which_are_actually_directories})
+
source_group(FILES ${tree_files_with_prefix} PREFIX tree_root/subgroup TREE ${root})
source_group(PREFIX "" FILES ${tree_files_with_empty_prefix} TREE ${root})