diff options
author | Brad King <brad.king@kitware.com> | 2021-06-14 13:41:38 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-06-14 13:41:50 (GMT) |
commit | 6fa9f3c6959bfb85c26522bbdd8f3a90847c8109 (patch) | |
tree | 9d04fc53e66561e251d7d486baf1ea0412e84522 | |
parent | 6230be49753a7a8bcf833f5aa896e3b5ed5c13ae (diff) | |
parent | 68bbec66e094e21bdace9607768895b0d381cc2c (diff) | |
download | CMake-6fa9f3c6959bfb85c26522bbdd8f3a90847c8109.zip CMake-6fa9f3c6959bfb85c26522bbdd8f3a90847c8109.tar.gz CMake-6fa9f3c6959bfb85c26522bbdd8f3a90847c8109.tar.bz2 |
Merge topic 'fileapi-link-fragments'
68bbec66e0 fileapi: Fix codemodel-v2 link command fragment relative paths
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6220
-rw-r--r-- | Source/cmFileAPICodemodel.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/cmFileAPICodemodel.cxx b/Source/cmFileAPICodemodel.cxx index 2d6745c..a2b5460 100644 --- a/Source/cmFileAPICodemodel.cxx +++ b/Source/cmFileAPICodemodel.cxx @@ -37,7 +37,7 @@ #include "cmInstallScriptGenerator.h" #include "cmInstallSubdirectoryGenerator.h" #include "cmInstallTargetGenerator.h" -#include "cmLinkLineComputer.h" +#include "cmLinkLineComputer.h" // IWYU pragma: keep #include "cmListFileCache.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" @@ -1780,9 +1780,10 @@ Json::Value Target::DumpLinkCommandFragments() std::vector<BT<std::string>> linkPath; std::vector<BT<std::string>> linkLibs; cmLocalGenerator* lg = this->GT->GetLocalGenerator(); - cmLinkLineComputer linkLineComputer(lg, - lg->GetStateSnapshot().GetDirectory()); - lg->GetTargetFlags(&linkLineComputer, this->Config, linkLibs, + cmGlobalGenerator* gg = this->GT->GetGlobalGenerator(); + std::unique_ptr<cmLinkLineComputer> linkLineComputer = + gg->CreateLinkLineComputer(lg, lg->GetStateSnapshot().GetDirectory()); + lg->GetTargetFlags(linkLineComputer.get(), this->Config, linkLibs, linkLanguageFlags, linkFlags, frameworkPath, linkPath, this->GT); linkLanguageFlags = cmTrimWhitespace(linkLanguageFlags); |