diff options
author | Brad King <brad.king@kitware.com> | 2006-09-15 18:31:24 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2006-09-15 18:31:24 (GMT) |
commit | 07ec25e383920899c6c506be8f706da2d6db26eb (patch) | |
tree | 72f2c560411fad9ce09d8885ba2b4fa150eb32a4 /Tests/ComplexRelativePaths/Library | |
parent | 1d0502927c32cb3a14c101da16d7ab97901dc2a2 (diff) | |
download | CMake-07ec25e383920899c6c506be8f706da2d6db26eb.zip CMake-07ec25e383920899c6c506be8f706da2d6db26eb.tar.gz CMake-07ec25e383920899c6c506be8f706da2d6db26eb.tar.bz2 |
ENH: Added test for linking to a static library that is next to a shared library. See bug#1644 for related changes.
Diffstat (limited to 'Tests/ComplexRelativePaths/Library')
-rw-r--r-- | Tests/ComplexRelativePaths/Library/CMakeLists.txt | 7 | ||||
-rw-r--r-- | Tests/ComplexRelativePaths/Library/TestLink.c | 8 |
2 files changed, 15 insertions, 0 deletions
diff --git a/Tests/ComplexRelativePaths/Library/CMakeLists.txt b/Tests/ComplexRelativePaths/Library/CMakeLists.txt index 3eeb1ea..9d37900 100644 --- a/Tests/ComplexRelativePaths/Library/CMakeLists.txt +++ b/Tests/ComplexRelativePaths/Library/CMakeLists.txt @@ -53,6 +53,13 @@ ELSE(${FOO_BAR_VAR} MATCHES "BAR") MESSAGE(SEND_ERROR "SET_TARGET_PROPERTIES or GET_TARGET_PROPERTY failed, FOO_BAR_VAR should be BAR, but is ${FOO_BAR_VAR}") ENDIF(${FOO_BAR_VAR} MATCHES "BAR") +# Create static and shared lib of same name. +IF(CMAKE_EXE_LINK_STATIC_CXX_FLAGS) + ADD_LIBRARY(CMakeTestLinkStatic STATIC TestLink.c) + ADD_LIBRARY(CMakeTestLinkShared SHARED TestLink.c) + SET_TARGET_PROPERTIES(CMakeTestLinkStatic CMakeTestLinkShared + PROPERTIES OUTPUT_NAME CMakeTestLink CLEAN_DIRECT_OUTPUT 1) +ENDIF(CMAKE_EXE_LINK_STATIC_CXX_FLAGS) # # Attach pre-build/pre-link/post-build custom-commands to the lib. diff --git a/Tests/ComplexRelativePaths/Library/TestLink.c b/Tests/ComplexRelativePaths/Library/TestLink.c new file mode 100644 index 0000000..25dee08 --- /dev/null +++ b/Tests/ComplexRelativePaths/Library/TestLink.c @@ -0,0 +1,8 @@ +int TestLinkGetType() +{ +#ifdef CMakeTestLinkShared_EXPORTS + return 0; +#else + return 1; +#endif +} |