summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-09-20 14:21:47 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-09-20 14:22:01 (GMT)
commit4ade1b00c5b2ca2e3c5ce5f5bcd7dd0a61ef7a2e (patch)
treea91134d134b2e95e3650e756613a954285cdaabd /Source/cmLocalGenerator.cxx
parent3c060ae6ca01464d507d6c7b6cef38639084418f (diff)
parent4d6334824d81086af205fe06b6fc4c4fda5224b4 (diff)
downloadCMake-4ade1b00c5b2ca2e3c5ce5f5bcd7dd0a61ef7a2e.zip
CMake-4ade1b00c5b2ca2e3c5ce5f5bcd7dd0a61ef7a2e.tar.gz
CMake-4ade1b00c5b2ca2e3c5ce5f5bcd7dd0a61ef7a2e.tar.bz2
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/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx36
1 files changed, 26 insertions, 10 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index afcd69f..d7c0611 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1199,17 +1199,21 @@ void cmLocalGenerator::GetTargetFlags(
std::string& linkLibs, std::string& flags, std::string& linkFlags,
std::string& frameworkPath, std::string& linkPath, cmGeneratorTarget* target)
{
- std::vector<BT<std::string>> tmpLinkFlags;
- this->GetTargetFlags(linkLineComputer, config, linkLibs, flags, tmpLinkFlags,
- frameworkPath, linkPath, target);
- this->AppendFlags(linkFlags, tmpLinkFlags);
+ std::vector<BT<std::string>> linkFlagsList;
+ std::vector<BT<std::string>> linkPathList;
+ std::vector<BT<std::string>> linkLibsList;
+ this->GetTargetFlags(linkLineComputer, config, linkLibsList, flags,
+ linkFlagsList, frameworkPath, linkPathList, target);
+ this->AppendFlags(linkFlags, linkFlagsList);
+ this->AppendFlags(linkPath, linkPathList);
+ this->AppendFlags(linkLibs, linkLibsList);
}
void cmLocalGenerator::GetTargetFlags(
cmLinkLineComputer* linkLineComputer, const std::string& config,
- std::string& linkLibs, std::string& flags,
+ std::vector<BT<std::string>>& linkLibs, std::string& flags,
std::vector<BT<std::string>>& linkFlags, std::string& frameworkPath,
- std::string& linkPath, cmGeneratorTarget* target)
+ std::vector<BT<std::string>>& linkPath, cmGeneratorTarget* target)
{
const std::string buildType = cmSystemTools::UpperCase(config);
cmComputeLinkInformation* pcli = target->GetLinkInformation(config);
@@ -1527,6 +1531,19 @@ void cmLocalGenerator::OutputLinkLibraries(
std::string& linkLibraries, std::string& frameworkPath,
std::string& linkPath)
{
+ std::vector<BT<std::string>> linkLibrariesList;
+ std::vector<BT<std::string>> linkPathList;
+ this->OutputLinkLibraries(pcli, linkLineComputer, linkLibrariesList,
+ frameworkPath, linkPathList);
+ pcli->AppendValues(linkLibraries, linkLibrariesList);
+ pcli->AppendValues(linkPath, linkPathList);
+}
+
+void cmLocalGenerator::OutputLinkLibraries(
+ cmComputeLinkInformation* pcli, cmLinkLineComputer* linkLineComputer,
+ std::vector<BT<std::string>>& linkLibraries, std::string& frameworkPath,
+ std::vector<BT<std::string>>& linkPath)
+{
cmComputeLinkInformation& cli = *pcli;
std::string linkLanguage = cli.GetLinkLanguage();
@@ -1558,10 +1575,9 @@ void cmLocalGenerator::OutputLinkLibraries(
cmStrCat("CMAKE_", linkLanguage, "_FRAMEWORK_SEARCH_FLAG"));
frameworkPath = linkLineComputer->ComputeFrameworkPath(cli, fwSearchFlag);
- linkPath =
- linkLineComputer->ComputeLinkPath(cli, libPathFlag, libPathTerminator);
-
- linkLibraries = linkLineComputer->ComputeLinkLibraries(cli, stdLibString);
+ linkLineComputer->ComputeLinkPath(cli, libPathFlag, libPathTerminator,
+ linkPath);
+ linkLineComputer->ComputeLinkLibraries(cli, stdLibString, linkLibraries);
}
std::string cmLocalGenerator::GetLinkLibsCMP0065(