diff options
author | Brad King <brad.king@kitware.com> | 2024-10-28 13:14:23 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2024-10-28 13:14:39 (GMT) |
commit | f42962bfbf350fbcc0a9c5e9c80cdd75e9173b8b (patch) | |
tree | ed498cd7c74a1897da3dcc28f87dfe27ffe3a134 /Source | |
parent | 7e7d1c6a46df5f9706a488e8ea9ed700d3f3d6d8 (diff) | |
parent | 39fd396421d7b5012e8fb567710ea1c99d67eeab (diff) | |
download | CMake-f42962bfbf350fbcc0a9c5e9c80cdd75e9173b8b.zip CMake-f42962bfbf350fbcc0a9c5e9c80cdd75e9173b8b.tar.gz CMake-f42962bfbf350fbcc0a9c5e9c80cdd75e9173b8b.tar.bz2 |
Merge topic 'link-strategy' into release-3.31
39fd396421 LINK_LIBRARIES_STRATEGY: Rename strategies to clarify expectations
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Craig Scott <craig.scott@crascit.com>
Merge-request: !9949
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmComputeLinkDepends.cxx | 4 | ||||
-rw-r--r-- | Source/cmComputeLinkDepends.h | 4 | ||||
-rw-r--r-- | Source/cmComputeLinkInformation.cxx | 10 |
3 files changed, 9 insertions, 9 deletions
diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx index ab2557b..551a45b 100644 --- a/Source/cmComputeLinkDepends.cxx +++ b/Source/cmComputeLinkDepends.cxx @@ -1521,14 +1521,14 @@ void cmComputeLinkDepends::OrderLinkEntries() // Start with the original link line. switch (this->Strategy) { - case LinkLibrariesStrategy::PRESERVE_ORDER: { + case LinkLibrariesStrategy::REORDER_MINIMALLY: { // Emit the direct dependencies in their original order. // This gives projects control over ordering. for (size_t originalEntry : this->OriginalEntries) { this->VisitEntry(originalEntry); } } break; - case LinkLibrariesStrategy::REORDER: { + case LinkLibrariesStrategy::REORDER_FREELY: { // Schedule the direct dependencies for emission in topo order. // This may produce more efficient link lines. for (size_t originalEntry : this->OriginalEntries) { diff --git a/Source/cmComputeLinkDepends.h b/Source/cmComputeLinkDepends.h index 8b8aba4..dc2fa45 100644 --- a/Source/cmComputeLinkDepends.h +++ b/Source/cmComputeLinkDepends.h @@ -29,8 +29,8 @@ class cmake; enum class LinkLibrariesStrategy { - PRESERVE_ORDER, - REORDER, + REORDER_MINIMALLY, + REORDER_FREELY, }; /** \class cmComputeLinkDepends diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index 26ff326..c2c210b 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -568,12 +568,12 @@ bool cmComputeLinkInformation::Compute() return false; } - LinkLibrariesStrategy strategy = LinkLibrariesStrategy::PRESERVE_ORDER; + LinkLibrariesStrategy strategy = LinkLibrariesStrategy::REORDER_MINIMALLY; if (cmValue s = this->Target->GetProperty("LINK_LIBRARIES_STRATEGY")) { - if (*s == "PRESERVE_ORDER"_s) { - strategy = LinkLibrariesStrategy::PRESERVE_ORDER; - } else if (*s == "REORDER"_s) { - strategy = LinkLibrariesStrategy::REORDER; + if (*s == "REORDER_MINIMALLY"_s) { + strategy = LinkLibrariesStrategy::REORDER_MINIMALLY; + } else if (*s == "REORDER_FREELY"_s) { + strategy = LinkLibrariesStrategy::REORDER_FREELY; } else { this->CMakeInstance->IssueMessage( MessageType::FATAL_ERROR, |