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/main.c | |
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/main.c')
-rw-r--r-- | Tests/SourceGroups/main.c | 9 |
1 files changed, 6 insertions, 3 deletions
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; } |