From 7a1b83cb3fc79639b9e2c1bf11af2d2274e4224a Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Fri, 23 Oct 2015 01:04:07 +0200 Subject: [PATCH] cmGeneratorTarget: Add GetUtilityBacktrace API --- Source/cmComputeTargetDepends.cxx | 2 +- Source/cmGeneratorTarget.cxx | 6 ++++++ Source/cmGeneratorTarget.h | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx index 113c9895a..586b5bfb1 100644 --- a/Source/cmComputeTargetDepends.cxx +++ b/Source/cmComputeTargetDepends.cxx @@ -382,7 +382,7 @@ void cmComputeTargetDepends::AddTargetDepend( << "\" of target \"" << depender->GetName() << "\" does not exist."; cmListFileBacktrace const* backtrace = - depender->Target->GetUtilityBacktrace(dependee_name); + depender->GetUtilityBacktrace(dependee_name); if(backtrace) { cm->IssueMessage(messageType, e.str(), *backtrace); diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 7d5a9d053..eb433f52b 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -1742,6 +1742,12 @@ const std::set& cmGeneratorTarget::GetUtilities() const return this->Target->GetUtilities(); } +const cmListFileBacktrace* +cmGeneratorTarget::GetUtilityBacktrace(const std::string& u) const +{ + return this->Target->GetUtilityBacktrace(u); +} + //---------------------------------------------------------------------------- bool cmGeneratorTarget::HaveWellDefinedOutputFiles() const { diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index ff975c51d..588ff33c8 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -187,6 +187,8 @@ public: const std::vector& GetLinkDirectories() const; std::setconst& GetUtilities() const; + cmListFileBacktrace const* GetUtilityBacktrace(const std::string& u) const; + /** Get the macro to define when building sources in this target. If no macro should be defined null is returned. */ const char* GetExportMacro() const;