diff options
author | Brad King <brad.king@kitware.com> | 2023-09-20 13:46:26 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-09-20 13:46:38 (GMT) |
commit | 3a210872828e14c4a9dbdcd9611504023487f19a (patch) | |
tree | a879b06894979db39c78de9828ab0d853e5e2c63 /Source | |
parent | 59f6892ab770c525bcadb30453b182412944aade (diff) | |
parent | f173ca21ca2d0e101451f2ffdbe822374ded21ed (diff) | |
download | CMake-3a210872828e14c4a9dbdcd9611504023487f19a.zip CMake-3a210872828e14c4a9dbdcd9611504023487f19a.tar.gz CMake-3a210872828e14c4a9dbdcd9611504023487f19a.tar.bz2 |
Merge topic 'cache-ldconfigpaths'
f173ca21ca cmBinUtilsLinuxELFLinker: Cache ldconfig results
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8811
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmBinUtilsLinuxELFLinker.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Source/cmBinUtilsLinuxELFLinker.cxx b/Source/cmBinUtilsLinuxELFLinker.cxx index 5972202..e2a8f92 100644 --- a/Source/cmBinUtilsLinuxELFLinker.cxx +++ b/Source/cmBinUtilsLinuxELFLinker.cxx @@ -73,6 +73,9 @@ bool cmBinUtilsLinuxELFLinker::Prepare() if (ldConfigTool == "ldconfig") { this->LDConfigTool = cm::make_unique<cmLDConfigLDConfigTool>(this->Archive); + if (!this->LDConfigTool->GetLDConfigPaths(this->LDConfigPaths)) { + return false; + } } else { std::ostringstream e; e << "Invalid value for CMAKE_LDCONFIG_TOOL: " << ldConfigTool; @@ -132,12 +135,8 @@ bool cmBinUtilsLinuxELFLinker::ScanDependencies( parentRpaths.end()); } - std::vector<std::string> ldConfigPaths; - if (!this->LDConfigTool->GetLDConfigPaths(ldConfigPaths)) { - return false; - } - searchPaths.insert(searchPaths.end(), ldConfigPaths.begin(), - ldConfigPaths.end()); + searchPaths.insert(searchPaths.end(), this->LDConfigPaths.begin(), + this->LDConfigPaths.end()); for (auto const& dep : needed) { if (!this->Archive->IsPreExcluded(dep)) { |