1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-13 17:47:49 +08:00

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
This commit is contained in:
Brad King
2021-06-14 13:41:38 +00:00
committed by Kitware Robot

View File

@@ -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);