diff options
Diffstat (limited to 'Tests/CMakeCommands/target_link_libraries')
-rw-r--r-- | Tests/CMakeCommands/target_link_libraries/CMakeLists.txt | 6 | ||||
-rw-r--r-- | Tests/CMakeCommands/target_link_libraries/newsignature1.cpp | 19 |
2 files changed, 25 insertions, 0 deletions
diff --git a/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt b/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt index 2240539..06019e6 100644 --- a/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt +++ b/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt @@ -124,3 +124,9 @@ add_library(libConsumer empty.cpp) 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") diff --git a/Tests/CMakeCommands/target_link_libraries/newsignature1.cpp b/Tests/CMakeCommands/target_link_libraries/newsignature1.cpp new file mode 100644 index 0000000..d1321a1 --- /dev/null +++ b/Tests/CMakeCommands/target_link_libraries/newsignature1.cpp @@ -0,0 +1,19 @@ + +#include "depB.h" +#include "depC.h" +#include "depIfaceOnly.h" + +#include "subdirlib.h" + +int main(int, char **) +{ + DepA a; + DepB b; + DepC c; + + DepIfaceOnly iface_only; + + SubDirLibObject sd; + + return a.foo() + b.foo() + c.foo() + iface_only.foo() + sd.foo(); +} |