diff options
author | Brad King <brad.king@kitware.com> | 2014-07-15 15:14:49 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-07-16 17:28:44 (GMT) |
commit | 0400cd5dd1be33ebcc2c2d5dba8233a78b1cee68 (patch) | |
tree | 979184257bfc93bfe422bcc489169f97377f405f /Tests/InterfaceLinkLibraries/CMakeLists.txt | |
parent | a0dc1354fe5effa1ff484b441595f8bdb6da3533 (diff) | |
download | CMake-0400cd5dd1be33ebcc2c2d5dba8233a78b1cee68.zip CMake-0400cd5dd1be33ebcc2c2d5dba8233a78b1cee68.tar.gz CMake-0400cd5dd1be33ebcc2c2d5dba8233a78b1cee68.tar.bz2 |
Make $<LINK_ONLY> available to projects (#14751)
Previously this generator expression was used internally by the
target_link_libraries command to honor private linking requirements of
static libraries in their INTERFACE_LINK_LIBRARIES. Remove the check
that limits $<LINK_ONLY> to this use case to make it available for
project code to use too.
Diffstat (limited to 'Tests/InterfaceLinkLibraries/CMakeLists.txt')
-rw-r--r-- | Tests/InterfaceLinkLibraries/CMakeLists.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Tests/InterfaceLinkLibraries/CMakeLists.txt b/Tests/InterfaceLinkLibraries/CMakeLists.txt index bd0cf74..9e14c44 100644 --- a/Tests/InterfaceLinkLibraries/CMakeLists.txt +++ b/Tests/InterfaceLinkLibraries/CMakeLists.txt @@ -9,6 +9,9 @@ target_compile_definitions(foo_shared INTERFACE FOO_LIBRARY) add_library(bar_shared SHARED bar_vs6_1.cpp) target_compile_definitions(bar_shared INTERFACE BAR_LIBRARY) set_property(TARGET bar_shared APPEND PROPERTY INTERFACE_LINK_LIBRARIES foo_shared) +add_library(zot_shared SHARED zot_vs6_1.cpp) +target_compile_definitions(zot_shared INTERFACE ZOT_LIBRARY) +set_property(TARGET bar_shared APPEND PROPERTY INTERFACE_LINK_LIBRARIES $<LINK_ONLY:zot_shared>) add_executable(shared_test main_vs6_1.cpp) set_property(TARGET shared_test APPEND PROPERTY LINK_LIBRARIES bar_shared) @@ -18,6 +21,9 @@ target_compile_definitions(foo_static INTERFACE FOO_LIBRARY) add_library(bar_static STATIC bar_vs6_2.cpp) target_compile_definitions(bar_static INTERFACE BAR_LIBRARY) set_property(TARGET bar_static APPEND PROPERTY INTERFACE_LINK_LIBRARIES foo_static) +add_library(zot_static STATIC zot_vs6_2.cpp) +target_compile_definitions(zot_static INTERFACE ZOT_LIBRARY) +set_property(TARGET bar_static APPEND PROPERTY INTERFACE_LINK_LIBRARIES $<LINK_ONLY:zot_static>) add_executable(static_test main_vs6_2.cpp) set_property(TARGET static_test APPEND PROPERTY LINK_LIBRARIES bar_static) @@ -31,6 +37,9 @@ target_compile_definitions(bar_shared_private INTERFACE BAR_LIBRARY) target_compile_definitions(bar_shared_private PRIVATE BAR_USE_BANG) set_property(TARGET bar_shared_private APPEND PROPERTY LINK_LIBRARIES bang_shared_private) set_property(TARGET bar_shared_private APPEND PROPERTY INTERFACE_LINK_LIBRARIES foo_shared_private) +add_library(zot_shared_private SHARED zot_vs6_3.cpp) +target_compile_definitions(zot_shared_private INTERFACE ZOT_LIBRARY) +set_property(TARGET bar_shared_private APPEND PROPERTY INTERFACE_LINK_LIBRARIES $<LINK_ONLY:zot_shared_private>) add_executable(shared_private_test main_vs6_3.cpp) set_property(TARGET shared_private_test APPEND PROPERTY LINK_LIBRARIES bar_shared_private) @@ -44,6 +53,9 @@ target_compile_definitions(bar_static_private INTERFACE BAR_LIBRARY) target_compile_definitions(bar_static_private PRIVATE BAR_USE_BANG) set_property(TARGET bar_static_private APPEND PROPERTY LINK_LIBRARIES bang_static_private) set_property(TARGET bar_static_private APPEND PROPERTY INTERFACE_LINK_LIBRARIES $<LINK_ONLY:bang_static_private> foo_static_private) +add_library(zot_static_private STATIC zot_vs6_4.cpp) +target_compile_definitions(zot_static_private INTERFACE ZOT_LIBRARY) +set_property(TARGET bar_static_private APPEND PROPERTY INTERFACE_LINK_LIBRARIES $<LINK_ONLY:zot_static_private>) add_executable(InterfaceLinkLibraries main_vs6_4.cpp) set_property(TARGET InterfaceLinkLibraries APPEND PROPERTY LINK_LIBRARIES bar_static_private) |