diff options
Diffstat (limited to 'Tests/BuildDepends/Project/CMakeLists.txt')
-rw-r--r-- | Tests/BuildDepends/Project/CMakeLists.txt | 15 |
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) |