• Brad King's avatar
    Fix export of STATIC library PRIVATE non-target dependencies · 87f44b75
    Brad King authored
    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's avatarBen Boeckel <ben.boeckel@kitware.com>
    87f44b75
Name
Last commit
Last update
..
SubDirTarget Loading commit data...
CMP0023-NEW-2-result.txt Loading commit data...
CMP0023-NEW-2-stderr.txt Loading commit data...
CMP0023-NEW-2.cmake Loading commit data...
CMP0023-NEW-result.txt Loading commit data...
CMP0023-NEW-stderr.txt Loading commit data...
CMP0023-NEW.cmake Loading commit data...
CMP0023-WARN-2-stderr.txt Loading commit data...
CMP0023-WARN-2.cmake Loading commit data...
CMP0023-WARN-stderr.txt Loading commit data...
CMP0023-WARN.cmake Loading commit data...
CMakeLists.txt Loading commit data...
MixedSignature-result.txt Loading commit data...
MixedSignature-stderr.txt Loading commit data...
MixedSignature.cmake Loading commit data...
RunCMakeTest.cmake Loading commit data...
Separate-PRIVATE-LINK_PRIVATE-uses-result.txt Loading commit data...
Separate-PRIVATE-LINK_PRIVATE-uses.cmake Loading commit data...
SharedDepNotTarget.cmake Loading commit data...
StaticPrivateDepNotExported-result.txt Loading commit data...
StaticPrivateDepNotExported-stderr.txt Loading commit data...
StaticPrivateDepNotExported.cmake Loading commit data...
StaticPrivateDepNotTarget.cmake Loading commit data...
SubDirTarget-result.txt Loading commit data...
SubDirTarget-stderr.txt Loading commit data...
SubDirTarget.cmake Loading commit data...
empty.c Loading commit data...
empty.cpp Loading commit data...
empty_vs6_1.cpp Loading commit data...
empty_vs6_2.cpp Loading commit data...
empty_vs6_3.cpp Loading commit data...