diff options
author | Brad King <brad.king@kitware.com> | 2017-05-18 12:53:47 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-05-18 12:53:51 (GMT) |
commit | 10371cd6dcfc1bf601fa3e715734dbe66199e2e4 (patch) | |
tree | 40bab8ae75055ba2e94209f432eb1f79fe4afc41 /Tests | |
parent | 21916a4784f06f14d1acb800d72758921120699b (diff) | |
parent | 4716f2be83f140deec28fd7c6b945c6fd401a433 (diff) | |
download | CMake-10371cd6dcfc1bf601fa3e715734dbe66199e2e4.zip CMake-10371cd6dcfc1bf601fa3e715734dbe66199e2e4.tar.gz CMake-10371cd6dcfc1bf601fa3e715734dbe66199e2e4.tar.bz2 |
Merge topic 'source_group-TREE-relative-path'
4716f2be source_group: Restore TREE support for relative paths
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !852
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/SourceGroups/CMakeLists.txt | 9 | ||||
-rw-r--r-- | Tests/SourceGroups/main.c | 9 | ||||
-rw-r--r-- | Tests/SourceGroups/tree_foo.c | 4 | ||||
-rw-r--r-- | Tests/SourceGroups/tree_prefix_bar.c | 4 | ||||
-rw-r--r-- | Tests/SourceGroups/tree_prefix_foo.c | 4 |
5 files changed, 19 insertions, 11 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}) diff --git a/Tests/SourceGroups/main.c b/Tests/SourceGroups/main.c index b88f2f8..4d84cf2 100644 --- a/Tests/SourceGroups/main.c +++ b/Tests/SourceGroups/main.c @@ -5,7 +5,8 @@ extern int bar(void); extern int foobar(void); extern int barbar(void); extern int baz(void); -extern int tree_foo(void); +extern int tree_prefix_foo(void); +extern int tree_prefix_bar(void); extern int tree_bar(void); extern int tree_foobar(void); extern int tree_baz(void); @@ -15,7 +16,9 @@ int main() printf("foo: %d bar: %d foobar: %d barbar: %d baz: %d\n", foo(), bar(), foobar(), barbar(), baz()); - printf("tree_foo: %d tree_bar: %d tree_foobar: %d tree_baz: %d\n", - tree_foo(), tree_bar(), tree_foobar(), tree_baz()); + printf("tree_prefix_foo: %d tree_prefix_bar: %d tree_bar: %d tree_foobar: " + "%d tree_baz: %d\n", + tree_prefix_foo(), tree_prefix_bar(), tree_bar(), tree_foobar(), + tree_baz()); return 0; } diff --git a/Tests/SourceGroups/tree_foo.c b/Tests/SourceGroups/tree_foo.c deleted file mode 100644 index d392e41..0000000 --- a/Tests/SourceGroups/tree_foo.c +++ /dev/null @@ -1,4 +0,0 @@ -int tree_foo(void) -{ - return 6; -} diff --git a/Tests/SourceGroups/tree_prefix_bar.c b/Tests/SourceGroups/tree_prefix_bar.c new file mode 100644 index 0000000..bd98476 --- /dev/null +++ b/Tests/SourceGroups/tree_prefix_bar.c @@ -0,0 +1,4 @@ +int tree_prefix_bar(void) +{ + return 66; +} diff --git a/Tests/SourceGroups/tree_prefix_foo.c b/Tests/SourceGroups/tree_prefix_foo.c new file mode 100644 index 0000000..92c2fd7 --- /dev/null +++ b/Tests/SourceGroups/tree_prefix_foo.c @@ -0,0 +1,4 @@ +int tree_prefix_foo(void) +{ + return 6; +} |