summaryrefslogtreecommitdiff
path: root/Source/cmFileAPICodemodel.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-09-20 14:21:47 +0000
committerKitware Robot <kwrobot@kitware.com>2019-09-20 10:22:01 -0400
commit4ade1b00c5b2ca2e3c5ce5f5bcd7dd0a61ef7a2e (patch)
treea91134d134b2e95e3650e756613a954285cdaabd /Source/cmFileAPICodemodel.cxx
parent3c060ae6ca01464d507d6c7b6cef38639084418f (diff)
parent4d6334824d81086af205fe06b6fc4c4fda5224b4 (diff)
downloadcmake-4ade1b00c5b2ca2e3c5ce5f5bcd7dd0a61ef7a2e.tar.gz
Merge topic 'fileapiLinkPathAndLinkDirBacktraces'
4d6334824d fileapi: add backtraces for LINK_PATH and LINK_DIRECTORIES 5bd65dff7a cmLocalGenerator: Add OutputLinkLibraries overload with backtraces 5d39e792ae cmGeneratorTarget: Store backtrace for target LINK_DIRECTORIES property 7da17ef797 cmLinkLineComputer: Add ComputeLinkLibraries overload with backtraces d4d0dd0f6a cmLinkLineComputer: Add ComputeLinkLibs overload with backtraces 0ac9dcb807 cmLinkLineComputer: Add ComputeLinkPath overload with backtraces 0c6468178a cmComputeLinkInformation: Add GetDirectoriesWithBacktraces a209b31d0d cmComputeLinkInformation: Add AppendValues with backtraces Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3805
Diffstat (limited to 'Source/cmFileAPICodemodel.cxx')
-rw-r--r--Source/cmFileAPICodemodel.cxx20
1 files changed, 12 insertions, 8 deletions
diff --git a/Source/cmFileAPICodemodel.cxx b/Source/cmFileAPICodemodel.cxx
index e33ba2d898..96ea071dcb 100644
--- a/Source/cmFileAPICodemodel.cxx
+++ b/Source/cmFileAPICodemodel.cxx
@@ -1269,8 +1269,8 @@ Json::Value Target::DumpLinkCommandFragments()
std::string linkLanguageFlags;
std::vector<BT<std::string>> linkFlags;
std::string frameworkPath;
- std::string linkPath;
- std::string linkLibs;
+ std::vector<BT<std::string>> linkPath;
+ std::vector<BT<std::string>> linkLibs;
cmLocalGenerator* lg = this->GT->GetLocalGenerator();
cmLinkLineComputer linkLineComputer(lg,
lg->GetStateSnapshot().GetDirectory());
@@ -1279,8 +1279,6 @@ Json::Value Target::DumpLinkCommandFragments()
this->GT);
linkLanguageFlags = cmTrimWhitespace(linkLanguageFlags);
frameworkPath = cmTrimWhitespace(frameworkPath);
- linkPath = cmTrimWhitespace(linkPath);
- linkLibs = cmTrimWhitespace(linkLibs);
if (!linkLanguageFlags.empty()) {
linkFragments.append(
@@ -1301,13 +1299,19 @@ Json::Value Target::DumpLinkCommandFragments()
}
if (!linkPath.empty()) {
- linkFragments.append(
- this->DumpCommandFragment(std::move(linkPath), "libraryPath"));
+ for (BT<std::string> frag : linkPath) {
+ frag.Value = cmTrimWhitespace(frag.Value);
+ linkFragments.append(
+ this->DumpCommandFragment(this->ToJBT(frag), "libraryPath"));
+ }
}
if (!linkLibs.empty()) {
- linkFragments.append(
- this->DumpCommandFragment(std::move(linkLibs), "libraries"));
+ for (BT<std::string> frag : linkLibs) {
+ frag.Value = cmTrimWhitespace(frag.Value);
+ linkFragments.append(
+ this->DumpCommandFragment(this->ToJBT(frag), "libraries"));
+ }
}
return linkFragments;