CMake/Tests/RunCMake/target_link_libraries
Brad King 87f44b7525 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>
2016-02-17 14:01:11 -05:00
..
SubDirTarget cmTarget: Fix diagnostic of target_link_libraries in wrong directory (#15626) 2015-06-25 09:14:26 -04:00
CMP0023-NEW-2-result.txt target_link_libraries: Add PUBLIC/PRIVATE/INTERFACE keyword signature 2013-07-24 11:52:44 -04:00
CMP0023-NEW-2-stderr.txt Policies: omit warnings about unset policies when they are actually set to NEW 2014-03-31 09:45:10 -04:00
CMP0023-NEW-2.cmake target_link_libraries: Add PUBLIC/PRIVATE/INTERFACE keyword signature 2013-07-24 11:52:44 -04:00
CMP0023-NEW-result.txt target_link_libraries: Add PUBLIC/PRIVATE/INTERFACE keyword signature 2013-07-24 11:52:44 -04:00
CMP0023-NEW-stderr.txt Policies: omit warnings about unset policies when they are actually set to NEW 2014-03-31 09:45:10 -04:00
CMP0023-NEW.cmake target_link_libraries: Add PUBLIC/PRIVATE/INTERFACE keyword signature 2013-07-24 11:52:44 -04:00
CMP0023-WARN-2-stderr.txt target_link_libraries: Add PUBLIC/PRIVATE/INTERFACE keyword signature 2013-07-24 11:52:44 -04:00
CMP0023-WARN-2.cmake target_link_libraries: Add PUBLIC/PRIVATE/INTERFACE keyword signature 2013-07-24 11:52:44 -04:00
CMP0023-WARN-stderr.txt target_link_libraries: Add PUBLIC/PRIVATE/INTERFACE keyword signature 2013-07-24 11:52:44 -04:00
CMP0023-WARN.cmake target_link_libraries: Add PUBLIC/PRIVATE/INTERFACE keyword signature 2013-07-24 11:52:44 -04:00
CMakeLists.txt Cygwin: Avoid legacy warnings in RunCMake.* tests 2013-08-13 09:50:15 -04:00
MixedSignature-result.txt target_link_libraries: Add PUBLIC/PRIVATE/INTERFACE keyword signature 2013-07-24 11:52:44 -04:00
MixedSignature-stderr.txt target_link_libraries: Add PUBLIC/PRIVATE/INTERFACE keyword signature 2013-07-24 11:52:44 -04:00
MixedSignature.cmake target_link_libraries: Add PUBLIC/PRIVATE/INTERFACE keyword signature 2013-07-24 11:52:44 -04:00
RunCMakeTest.cmake Fix export of STATIC library PRIVATE non-target dependencies 2016-02-17 14:01:11 -05:00
Separate-PRIVATE-LINK_PRIVATE-uses-result.txt target_link_libraries: Add PUBLIC/PRIVATE/INTERFACE keyword signature 2013-07-24 11:52:44 -04:00
Separate-PRIVATE-LINK_PRIVATE-uses.cmake target_link_libraries: Add PUBLIC/PRIVATE/INTERFACE keyword signature 2013-07-24 11:52:44 -04:00
SharedDepNotTarget.cmake cmComputeLinkInformation: Lookup a target only if we have one 2015-08-13 10:24:10 -04:00
StaticPrivateDepNotExported-result.txt Fix export of STATIC library PRIVATE non-target dependencies 2016-02-17 14:01:11 -05:00
StaticPrivateDepNotExported-stderr.txt Fix export of STATIC library PRIVATE non-target dependencies 2016-02-17 14:01:11 -05:00
StaticPrivateDepNotExported.cmake Fix export of STATIC library PRIVATE non-target dependencies 2016-02-17 14:01:11 -05:00
StaticPrivateDepNotTarget.cmake Fix export of STATIC library PRIVATE non-target dependencies 2016-02-17 14:01:11 -05:00
SubDirTarget-result.txt cmTarget: Fix diagnostic of target_link_libraries in wrong directory (#15626) 2015-06-25 09:14:26 -04:00
SubDirTarget-stderr.txt cmTarget: Fix diagnostic of target_link_libraries in wrong directory (#15626) 2015-06-25 09:14:26 -04:00
SubDirTarget.cmake cmTarget: Fix diagnostic of target_link_libraries in wrong directory (#15626) 2015-06-25 09:14:26 -04:00
empty.c cmTarget: Fix diagnostic of target_link_libraries in wrong directory (#15626) 2015-06-25 09:14:26 -04:00
empty.cpp target_link_libraries: Add PUBLIC/PRIVATE/INTERFACE keyword signature 2013-07-24 11:52:44 -04:00
empty_vs6_1.cpp target_link_libraries: Add PUBLIC/PRIVATE/INTERFACE keyword signature 2013-07-24 11:52:44 -04:00
empty_vs6_2.cpp target_link_libraries: Add PUBLIC/PRIVATE/INTERFACE keyword signature 2013-07-24 11:52:44 -04:00
empty_vs6_3.cpp target_link_libraries: Add PUBLIC/PRIVATE/INTERFACE keyword signature 2013-07-24 11:52:44 -04:00