diff options
author | Brad King <brad.king@kitware.com> | 2016-02-17 13:34:15 -0500 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-02-17 14:01:11 -0500 |
commit | 87f44b7525ebc9761b32b98f0c9e1276431e6ec1 (patch) | |
tree | bc9f85d94b060bcb9dc4765e94646959a9376e5b /Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake | |
parent | a5a5a6857241c21d306661d723b749839f4c6e1a (diff) | |
download | cmake-87f44b7525ebc9761b32b98f0c9e1276431e6ec1.tar.gz |
Fix export of STATIC library PRIVATE non-target dependencies
In commit v3.5.0-rc1~43^2 (Fix export of STATIC library PRIVATE
dependencies with CMP0022 NEW, 2016-01-15) we taught
target_link_libraries to generate `$<LINK_ONLY:$<TARGET_NAME:dep>>` in
INTERFACE_LINK_LIBRARIES instead of `$<LINK_ONLY:dep>` so that `dep` can
be recognized as a target name and updated during export. However, this
approach does not work when `dep` is just a plain library name and not a
target because `$<TARGET_NAME:...>` requires the name of a reachable
target.
Since we do not know during target_link_libraries whether the name will
correspond to a reachable target or not, we cannot inject the
`$<TARGET_NAME:...>` expression. Revert this change and solve the
original problem instead by teaching the export logic to recognize and
update target names directly in `$<LINK_ONLY:...>` expressions.
Reported-by: Ben Boeckel <ben.boeckel@kitware.com>
Diffstat (limited to 'Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake')
-rw-r--r-- | Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake b/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake index 8307607bc2..1466fbf61d 100644 --- a/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake +++ b/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake @@ -8,3 +8,5 @@ run_cmake(MixedSignature) run_cmake(Separate-PRIVATE-LINK_PRIVATE-uses) run_cmake(SubDirTarget) run_cmake(SharedDepNotTarget) +run_cmake(StaticPrivateDepNotExported) +run_cmake(StaticPrivateDepNotTarget) |