diff options
author | Brad King <brad.king@kitware.com> | 2024-09-19 17:10:04 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2024-09-25 10:48:57 (GMT) |
commit | 7abd3137b74543cf698ac6c7290696d82042e7de (patch) | |
tree | d4141467b3945aa493e46e94ba4616febbdb8287 /Tests/RunCMake/CrosscompilingEmulator/AddCustomCommand-build-check.cmake | |
parent | 9285a9dc9a71bcf511b22a14aaa4a13ebf269480 (diff) | |
download | CMake-7abd3137b74543cf698ac6c7290696d82042e7de.zip CMake-7abd3137b74543cf698ac6c7290696d82042e7de.tar.gz CMake-7abd3137b74543cf698ac6c7290696d82042e7de.tar.bz2 |
Linking: Optionally reorder direct dependencies from LINK_LIBRARIES
Traditionally CMake generates link lines by starting with the direct
link dependencies specified by `LINK_LIBRARIES` in their original order
and then appending indirect dependencies that the direct dependencies
do not express. This gives projects control over ordering among
independent entries, which can be important when intermixing flags
and libraries, or when multiple libraries provide the same symbol.
However, it may also result in inefficient link lines.
Add support for an alternative strategy that can reorder direct link
dependencies to produce more efficient link lines. This is useful
for projects that cannot easily specify their targets' direct
dependencies in an order that satisfies indirect dependencies.
Add a `CMAKE_LINK_LIBRARIES_STRATEGY` variable and corresponding
`LINK_LIBRARIES_STRATEGY` target property to select a strategy.
Fixes: #26271
Diffstat (limited to 'Tests/RunCMake/CrosscompilingEmulator/AddCustomCommand-build-check.cmake')
0 files changed, 0 insertions, 0 deletions