From 464a6cbf349b563c379849cb8ca69b0c26b89552 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 23 Apr 2008 00:40:32 -0400 Subject: ENH: Add test of preservation of static libraries on original link lines. --- Tests/Dependency/CMakeLists.txt | 1 + Tests/Dependency/Case3/CMakeLists.txt | 10 ++++++++++ Tests/Dependency/Case3/bar.c | 5 +++++ Tests/Dependency/Case3/foo1.c | 2 ++ Tests/Dependency/Case3/foo1b.c | 1 + Tests/Dependency/Case3/foo2.c | 2 ++ 6 files changed, 21 insertions(+) create mode 100644 Tests/Dependency/Case3/CMakeLists.txt create mode 100644 Tests/Dependency/Case3/bar.c create mode 100644 Tests/Dependency/Case3/foo1.c create mode 100644 Tests/Dependency/Case3/foo1b.c create mode 100644 Tests/Dependency/Case3/foo2.c diff --git a/Tests/Dependency/CMakeLists.txt b/Tests/Dependency/CMakeLists.txt index 729c028..d2c1c1a 100644 --- a/Tests/Dependency/CMakeLists.txt +++ b/Tests/Dependency/CMakeLists.txt @@ -51,3 +51,4 @@ ADD_SUBDIRECTORY(Exec4) # projects. ADD_SUBDIRECTORY(Case1) ADD_SUBDIRECTORY(Case2) +ADD_SUBDIRECTORY(Case3) diff --git a/Tests/Dependency/Case3/CMakeLists.txt b/Tests/Dependency/Case3/CMakeLists.txt new file mode 100644 index 0000000..f01dd05 --- /dev/null +++ b/Tests/Dependency/Case3/CMakeLists.txt @@ -0,0 +1,10 @@ +project(CASE3 C) + +add_library(case3Foo1 STATIC foo1.c foo1b.c) +add_library(case3Foo2 STATIC foo2.c) + +add_executable(case3Bar bar.c) +target_link_libraries(case3Bar case3Foo1 case3Foo2 case3Foo1) + +#set_property(GLOBAL PROPERTY GLOBAL_DEPENDS_DEBUG_MODE 1) +#set(CMAKE_LINK_DEPENDS_DEBUG_MODE 1) diff --git a/Tests/Dependency/Case3/bar.c b/Tests/Dependency/Case3/bar.c new file mode 100644 index 0000000..62959c1 --- /dev/null +++ b/Tests/Dependency/Case3/bar.c @@ -0,0 +1,5 @@ +extern int foo1(void); +int main(void) +{ + return foo1(); +} diff --git a/Tests/Dependency/Case3/foo1.c b/Tests/Dependency/Case3/foo1.c new file mode 100644 index 0000000..5f1f8ac --- /dev/null +++ b/Tests/Dependency/Case3/foo1.c @@ -0,0 +1,2 @@ +extern int foo2(void); +int foo1(void) { return foo2(); } diff --git a/Tests/Dependency/Case3/foo1b.c b/Tests/Dependency/Case3/foo1b.c new file mode 100644 index 0000000..6ae3bab --- /dev/null +++ b/Tests/Dependency/Case3/foo1b.c @@ -0,0 +1 @@ +int foo1b(void) { return 0; } diff --git a/Tests/Dependency/Case3/foo2.c b/Tests/Dependency/Case3/foo2.c new file mode 100644 index 0000000..33dbbfc --- /dev/null +++ b/Tests/Dependency/Case3/foo2.c @@ -0,0 +1,2 @@ +extern int foo1b(void); +int foo2(void) { return foo1b(); } -- cgit v0.12