diff options
author | Justin Goshi <jgoshi@microsoft.com> | 2019-09-11 18:37:48 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-09-18 18:00:39 (GMT) |
commit | 4d6334824d81086af205fe06b6fc4c4fda5224b4 (patch) | |
tree | 68fde8e73c4a899bc50dbd17ef5ae39423935c49 /Source/cmFileAPICodemodel.cxx | |
parent | 5bd65dff7a8198279b1e592b7e48b91119dfc794 (diff) | |
download | CMake-4d6334824d81086af205fe06b6fc4c4fda5224b4.zip CMake-4d6334824d81086af205fe06b6fc4c4fda5224b4.tar.gz CMake-4d6334824d81086af205fe06b6fc4c4fda5224b4.tar.bz2 |
fileapi: add backtraces for LINK_PATH and LINK_DIRECTORIES
Diffstat (limited to 'Source/cmFileAPICodemodel.cxx')
-rw-r--r-- | Source/cmFileAPICodemodel.cxx | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/Source/cmFileAPICodemodel.cxx b/Source/cmFileAPICodemodel.cxx index 805da81..3cf929f 100644 --- a/Source/cmFileAPICodemodel.cxx +++ b/Source/cmFileAPICodemodel.cxx @@ -1270,8 +1270,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()); @@ -1280,8 +1280,6 @@ Json::Value Target::DumpLinkCommandFragments() this->GT); linkLanguageFlags = cmTrimWhitespace(linkLanguageFlags); frameworkPath = cmTrimWhitespace(frameworkPath); - linkPath = cmTrimWhitespace(linkPath); - linkLibs = cmTrimWhitespace(linkLibs); if (!linkLanguageFlags.empty()) { linkFragments.append( @@ -1302,13 +1300,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; |