diff options
author | Mateusz Janek <stryku2393@gmail.com> | 2017-05-15 20:01:10 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-05-17 13:04:02 (GMT) |
commit | 4716f2be83f140deec28fd7c6b945c6fd401a433 (patch) | |
tree | 70d978f1f7ce45dfc19270b902000c5ffb64939f /Tests/SourceGroups/CMakeLists.txt | |
parent | 8bd6af0d6386d1e0b26ff594b7d42621d67b5985 (diff) | |
download | CMake-4716f2be83f140deec28fd7c6b945c6fd401a433.zip CMake-4716f2be83f140deec28fd7c6b945c6fd401a433.tar.gz CMake-4716f2be83f140deec28fd7c6b945c6fd401a433.tar.bz2 |
source_group: Restore TREE support for relative paths
The fix in commit v3.8.1~4^2 (source_group: Fix TREE with root that is
not current source dir, 2017-04-20) accidentally broke support for
specifying paths relative to the source directory. Fix it and add a
test covering the case.
While at it, fix a typo in a variable name.
Fixes: #16876
Diffstat (limited to 'Tests/SourceGroups/CMakeLists.txt')
-rw-r--r-- | Tests/SourceGroups/CMakeLists.txt | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Tests/SourceGroups/CMakeLists.txt b/Tests/SourceGroups/CMakeLists.txt index 9289e84..4e4a030 100644 --- a/Tests/SourceGroups/CMakeLists.txt +++ b/Tests/SourceGroups/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.8) project(SourceGroups) # this is not really a test which can fail @@ -33,10 +33,11 @@ source_group(EmptyGroup) set(root ${CMAKE_CURRENT_SOURCE_DIR}) set(tree_files_without_prefix ${root}/sub1/tree_bar.c - ${root}/sub1/tree_baz.c - ${root}/sub1/tree_subdir/tree_foobar.c) + sub1/tree_baz.c + sub1/../sub1/tree_subdir/tree_foobar.c) -set(tree_files_with_prefix ${root}/tree_foo.c) +set(tree_files_with_prefix ${root}/tree_prefix_foo.c + tree_prefix_bar.c) source_group(TREE ${root} FILES ${tree_files_without_prefix}) |