From 5bd65dff7a8198279b1e592b7e48b91119dfc794 Mon Sep 17 00:00:00 2001 From: Justin Goshi Date: Wed, 11 Sep 2019 11:15:08 -0700 Subject: cmLocalGenerator: Add OutputLinkLibraries overload with backtraces --- Source/cmLocalGenerator.cxx | 20 ++++++++++++++++---- Source/cmLocalGenerator.h | 5 +++++ 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 9f22277..a4b482c 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1526,6 +1526,19 @@ void cmLocalGenerator::OutputLinkLibraries( std::string& linkLibraries, std::string& frameworkPath, std::string& linkPath) { + std::vector> linkLibrariesList; + std::vector> 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>& linkLibraries, std::string& frameworkPath, + std::vector>& linkPath) +{ cmComputeLinkInformation& cli = *pcli; std::string linkLanguage = cli.GetLinkLanguage(); @@ -1557,10 +1570,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( diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 34f58bd..f04f391 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -430,6 +430,11 @@ protected: cmLinkLineComputer* linkLineComputer, std::string& linkLibraries, std::string& frameworkPath, std::string& linkPath); + void OutputLinkLibraries(cmComputeLinkInformation* pcli, + cmLinkLineComputer* linkLineComputer, + std::vector>& linkLibraries, + std::string& frameworkPath, + std::vector>& linkPath); // Handle old-style install rules stored in the targets. void GenerateTargetInstallRules( -- cgit v0.12