mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-04 04:40:56 -06:00
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
25 lines
632 B
C
25 lines
632 B
C
#include <stdio.h>
|
|
|
|
extern int foo(void);
|
|
extern int bar(void);
|
|
extern int foobar(void);
|
|
extern int barbar(void);
|
|
extern int baz(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);
|
|
|
|
int main()
|
|
{
|
|
printf("foo: %d bar: %d foobar: %d barbar: %d baz: %d\n", foo(), bar(),
|
|
foobar(), barbar(), 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;
|
|
}
|