diff options
Diffstat (limited to 'Tests/CMakeCommands/target_link_libraries/CMakeLists.txt')
-rw-r--r-- | Tests/CMakeCommands/target_link_libraries/CMakeLists.txt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt b/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt index 388164455..06019e691 100644 --- a/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt +++ b/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt @@ -114,3 +114,19 @@ endif() # shortcutting of the evaluation by returning an empty string. set(_exe_test $<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>) target_link_libraries(targetC $<$<AND:${_exe_test},${_exe_test}>:depG>) + +add_library(libConsumer empty.cpp) +# This line causes $<$<CONFIG:Debug>:depA> to be used when +# determining the include directories for libConsumer based on the +# interface properties of its LINK_LIBRARIES. Because the above expression +# evaluates to the empty string in non-Debug cases, ensure that that causes +# no problems. +target_link_libraries(libConsumer debug depA) + +add_subdirectory(cmp0022) + +add_executable(newsignature1 newsignature1.cpp) +target_link_libraries(newsignature1 PRIVATE depC INTERFACE depD PUBLIC depB PRIVATE subdirlib INTERFACE INTERFACE PUBLIC) + +assert_property(newsignature1 INTERFACE_LINK_LIBRARIES "depD;depB") +assert_property(newsignature1 LINK_LIBRARIES "depC;depB;subdirlib") |