diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2021-11-19 18:08:30 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2022-02-08 10:41:04 (GMT) |
commit | 2a6b0415d71db893b6d8edd1c5058d42eb40fca6 (patch) | |
tree | 4bf1015d035518cb818ba6828bdfe0b0d96962d0 /Tests/RunCMake/GenEx-LINK_LIBRARY/incompatible-features3.cmake | |
parent | 42965799b4747ab1e0afa6546be13444f68c1987 (diff) | |
download | CMake-2a6b0415d71db893b6d8edd1c5058d42eb40fca6.zip CMake-2a6b0415d71db893b6d8edd1c5058d42eb40fca6.tar.gz CMake-2a6b0415d71db893b6d8edd1c5058d42eb40fca6.tar.bz2 |
$<LINK_LIBRARY>: Add LINK_LIBRARY_OVERRIDE target property
To enable the management of incompatible $<LINK_LIBRARY> declarations,
add LINK_LIBRARY_OVERRIDE and LINK_LIBRARY_OVERRIDE_<LIBRARY> target
properties.
Diffstat (limited to 'Tests/RunCMake/GenEx-LINK_LIBRARY/incompatible-features3.cmake')
-rw-r--r-- | Tests/RunCMake/GenEx-LINK_LIBRARY/incompatible-features3.cmake | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Tests/RunCMake/GenEx-LINK_LIBRARY/incompatible-features3.cmake b/Tests/RunCMake/GenEx-LINK_LIBRARY/incompatible-features3.cmake new file mode 100644 index 0000000..1198d91 --- /dev/null +++ b/Tests/RunCMake/GenEx-LINK_LIBRARY/incompatible-features3.cmake @@ -0,0 +1,15 @@ +enable_language(C) + +set(CMAKE_C_LINK_USING_feat1_SUPPORTED TRUE) +set(CMAKE_C_LINK_USING_feat1 "<LIBRARY>") + +set(CMAKE_C_LINK_USING_feat2_SUPPORTED TRUE) +set(CMAKE_C_LINK_USING_feat2 "<LIBRARY>") + +add_library(dep1 SHARED empty.c) + +add_library(dep2 SHARED empty.c) +target_link_libraries(dep2 PUBLIC $<LINK_LIBRARY:feat1,dep1>) + +add_library(lib SHARED empty.c) +target_link_libraries(lib PRIVATE dep1 dep2) |