diff --git a/Tests/SourceGroups/CMakeLists.txt b/Tests/SourceGroups/CMakeLists.txt new file mode 100644 index 0000000000..ab96bacccc --- /dev/null +++ b/Tests/SourceGroups/CMakeLists.txt @@ -0,0 +1,9 @@ +#source_group(Base FILES main.c) +#source_group(Base\\Sub1 FILES sub1/foo.c) +#source_group(Base\\Sub1\\Sub2 FILES sub1/foobar.c) +#source_group("" FILES foo.c) +#source_group("\\" FILES bar.c) + + +add_executable(SourceGroups main.c bar.c foo.c sub1/foo.c sub1/foobar.c) + diff --git a/Tests/SourceGroups/bar.c b/Tests/SourceGroups/bar.c new file mode 100644 index 0000000000..a2fcad5e95 --- /dev/null +++ b/Tests/SourceGroups/bar.c @@ -0,0 +1,4 @@ +int barbar(void) +{ + return 2; +} diff --git a/Tests/SourceGroups/foo.c b/Tests/SourceGroups/foo.c new file mode 100644 index 0000000000..3bebc4d22d --- /dev/null +++ b/Tests/SourceGroups/foo.c @@ -0,0 +1,4 @@ +int bar(void) +{ + return 42; +} diff --git a/Tests/SourceGroups/main.c b/Tests/SourceGroups/main.c new file mode 100644 index 0000000000..cd17e24c76 --- /dev/null +++ b/Tests/SourceGroups/main.c @@ -0,0 +1,12 @@ +#include + +extern int foo(void); +extern int bar(void); +extern int foobar(void); +extern int barbar(void); + +int main() +{ + printf("foo: %d bar: %d foobar: %d barbar: %d\n", foo(), bar(), foobar(), barbar()); + return 0; +} diff --git a/Tests/SourceGroups/sub1/foo.c b/Tests/SourceGroups/sub1/foo.c new file mode 100644 index 0000000000..39912a7481 --- /dev/null +++ b/Tests/SourceGroups/sub1/foo.c @@ -0,0 +1,4 @@ +int foo(void) +{ + return 17; +} diff --git a/Tests/SourceGroups/sub1/foobar.c b/Tests/SourceGroups/sub1/foobar.c new file mode 100644 index 0000000000..32588b5e1a --- /dev/null +++ b/Tests/SourceGroups/sub1/foobar.c @@ -0,0 +1,4 @@ +int foobar(void) +{ + return 1477; +}