summaryrefslogtreecommitdiffstats
path: root/Tests/BuildDepends/Project/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-11-13 19:31:54 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2012-11-13 19:31:54 (GMT)
commit035c29fee4b74fcd9146941193f88670dfa0e437 (patch)
tree3932a74dec5dfdd18e42a9e34b9993c712061ad8 /Tests/BuildDepends/Project/CMakeLists.txt
parent87b8487d149ac4fcf081bee6871f4f04a096b0b6 (diff)
parent306796e86206f2b6cf0bd3b66735f2e825c6bcbd (diff)
downloadCMake-035c29fee4b74fcd9146941193f88670dfa0e437.zip
CMake-035c29fee4b74fcd9146941193f88670dfa0e437.tar.gz
CMake-035c29fee4b74fcd9146941193f88670dfa0e437.tar.bz2
Merge topic 'link-depends-no-shared'
306796e Teach BuildDepends test to cover LINK_DEPENDS_NO_SHARED ed97631 Optionally skip link dependencies on shared library files
Diffstat (limited to 'Tests/BuildDepends/Project/CMakeLists.txt')
-rw-r--r--Tests/BuildDepends/Project/CMakeLists.txt15
1 files changed, 15 insertions, 0 deletions
diff --git a/Tests/BuildDepends/Project/CMakeLists.txt b/Tests/BuildDepends/Project/CMakeLists.txt
index 542c716..f8a3d15 100644
--- a/Tests/BuildDepends/Project/CMakeLists.txt
+++ b/Tests/BuildDepends/Project/CMakeLists.txt
@@ -108,3 +108,18 @@ if(TEST_LINK_DEPENDS)
add_executable(linkdep linkdep.cxx)
set_property(TARGET linkdep PROPERTY LINK_DEPENDS ${TEST_LINK_DEPENDS})
endif()
+
+add_library(link_depends_no_shared_lib SHARED link_depends_no_shared_lib.c
+ ${CMAKE_CURRENT_BINARY_DIR}/link_depends_no_shared_lib.h)
+add_executable(link_depends_no_shared_exe link_depends_no_shared_exe.c
+ ${CMAKE_CURRENT_BINARY_DIR}/link_depends_no_shared_exe.h)
+target_link_libraries(link_depends_no_shared_exe link_depends_no_shared_lib)
+set_property(TARGET link_depends_no_shared_exe PROPERTY LINK_DEPENDS_NO_SHARED 1)
+add_custom_target(link_depends_no_shared_check ALL
+ COMMAND ${CMAKE_COMMAND}
+ -Dlib=$<TARGET_FILE:link_depends_no_shared_lib>
+ -Dexe=$<TARGET_FILE:link_depends_no_shared_exe>
+ -Dout=${CMAKE_CURRENT_BINARY_DIR}/link_depends_no_shared_check.txt
+ -P ${CMAKE_CURRENT_SOURCE_DIR}/link_depends_no_shared_check.cmake
+ )
+add_dependencies(link_depends_no_shared_check link_depends_no_shared_exe)