mirror of
https://github.com/reactos/CMake.git
synced 2024-11-27 21:41:03 +00:00
ENH: add test for source_group
Alex
This commit is contained in:
parent
d634c4e743
commit
e7a1b85f76
9
Tests/SourceGroups/CMakeLists.txt
Normal file
9
Tests/SourceGroups/CMakeLists.txt
Normal file
@ -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)
|
||||
|
4
Tests/SourceGroups/bar.c
Normal file
4
Tests/SourceGroups/bar.c
Normal file
@ -0,0 +1,4 @@
|
||||
int barbar(void)
|
||||
{
|
||||
return 2;
|
||||
}
|
4
Tests/SourceGroups/foo.c
Normal file
4
Tests/SourceGroups/foo.c
Normal file
@ -0,0 +1,4 @@
|
||||
int bar(void)
|
||||
{
|
||||
return 42;
|
||||
}
|
12
Tests/SourceGroups/main.c
Normal file
12
Tests/SourceGroups/main.c
Normal file
@ -0,0 +1,12 @@
|
||||
#include <stdio.h>
|
||||
|
||||
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;
|
||||
}
|
4
Tests/SourceGroups/sub1/foo.c
Normal file
4
Tests/SourceGroups/sub1/foo.c
Normal file
@ -0,0 +1,4 @@
|
||||
int foo(void)
|
||||
{
|
||||
return 17;
|
||||
}
|
4
Tests/SourceGroups/sub1/foobar.c
Normal file
4
Tests/SourceGroups/sub1/foobar.c
Normal file
@ -0,0 +1,4 @@
|
||||
int foobar(void)
|
||||
{
|
||||
return 1477;
|
||||
}
|
Loading…
Reference in New Issue
Block a user