diff options
Diffstat (limited to 'Tests/Dependency/Case2')
-rw-r--r-- | Tests/Dependency/Case2/CMakeLists.txt | 20 | ||||
-rw-r--r-- | Tests/Dependency/Case2/bar1.c | 4 | ||||
-rw-r--r-- | Tests/Dependency/Case2/bar2.c | 2 | ||||
-rw-r--r-- | Tests/Dependency/Case2/bar3.c | 2 | ||||
-rw-r--r-- | Tests/Dependency/Case2/foo1.c | 3 | ||||
-rw-r--r-- | Tests/Dependency/Case2/foo2.c | 2 | ||||
-rw-r--r-- | Tests/Dependency/Case2/foo3.c | 2 | ||||
-rw-r--r-- | Tests/Dependency/Case2/zot.c | 5 |
8 files changed, 40 insertions, 0 deletions
diff --git a/Tests/Dependency/Case2/CMakeLists.txt b/Tests/Dependency/Case2/CMakeLists.txt new file mode 100644 index 0000000..764338e --- /dev/null +++ b/Tests/Dependency/Case2/CMakeLists.txt @@ -0,0 +1,20 @@ +project(CASE2 C) + +add_library(case2Foo1 STATIC foo1.c) +add_library(case2Foo2 STATIC foo2.c) +add_library(case2Foo3 STATIC foo3.c) +target_link_libraries(case2Foo1 case2Foo2) +target_link_libraries(case2Foo2 case2Foo3) +target_link_libraries(case2Foo3 case2Foo1) + +add_library(case2Bar1 STATIC bar1.c) +add_library(case2Bar2 STATIC bar2.c) +add_library(case2Bar3 STATIC bar3.c) +target_link_libraries(case2Bar1 case2Bar2 case2Foo1) +target_link_libraries(case2Bar2 case2Bar3) +target_link_libraries(case2Bar3 case2Bar1) + +add_executable(case2Zot zot.c) +target_link_libraries(case2Zot case2Bar1) + +#set_property(GLOBAL PROPERTY GLOBAL_DEPENDS_DEBUG_MODE 1) diff --git a/Tests/Dependency/Case2/bar1.c b/Tests/Dependency/Case2/bar1.c new file mode 100644 index 0000000..6108fba --- /dev/null +++ b/Tests/Dependency/Case2/bar1.c @@ -0,0 +1,4 @@ +extern int foo1(); +extern int bar2(void); +int bar1(void) { return bar2(); } +int bar1_from_bar3(void) { return foo1(); } diff --git a/Tests/Dependency/Case2/bar2.c b/Tests/Dependency/Case2/bar2.c new file mode 100644 index 0000000..b9a2360 --- /dev/null +++ b/Tests/Dependency/Case2/bar2.c @@ -0,0 +1,2 @@ +extern int bar3(void); +int bar2(void) { return bar3(); } diff --git a/Tests/Dependency/Case2/bar3.c b/Tests/Dependency/Case2/bar3.c new file mode 100644 index 0000000..73e8556 --- /dev/null +++ b/Tests/Dependency/Case2/bar3.c @@ -0,0 +1,2 @@ +extern int bar1_from_bar3(void); +int bar3(void) { return bar1_from_bar3(); } diff --git a/Tests/Dependency/Case2/foo1.c b/Tests/Dependency/Case2/foo1.c new file mode 100644 index 0000000..0dbf426 --- /dev/null +++ b/Tests/Dependency/Case2/foo1.c @@ -0,0 +1,3 @@ +extern int foo2(void); +int foo1(void) { return foo2(); } +int foo1_from_foo3(void) { return 0; } diff --git a/Tests/Dependency/Case2/foo2.c b/Tests/Dependency/Case2/foo2.c new file mode 100644 index 0000000..6019236 --- /dev/null +++ b/Tests/Dependency/Case2/foo2.c @@ -0,0 +1,2 @@ +extern int foo3(void); +int foo2(void) { return foo3(); } diff --git a/Tests/Dependency/Case2/foo3.c b/Tests/Dependency/Case2/foo3.c new file mode 100644 index 0000000..eb5bd0f --- /dev/null +++ b/Tests/Dependency/Case2/foo3.c @@ -0,0 +1,2 @@ +extern int foo1_from_foo3(void); +int foo3(void) { return foo1_from_foo3(); } diff --git a/Tests/Dependency/Case2/zot.c b/Tests/Dependency/Case2/zot.c new file mode 100644 index 0000000..f25b493 --- /dev/null +++ b/Tests/Dependency/Case2/zot.c @@ -0,0 +1,5 @@ +extern int bar1(void); +int main(void) +{ + return bar1(); +} |