Forráskód Böngészése

cmGeneratorTarget: Add GetUtilityBacktrace API

Stephen Kelly 10 éve
szülő
commit
7a1b83cb3f

+ 1 - 1
Source/cmComputeTargetDepends.cxx

@@ -382,7 +382,7 @@ void cmComputeTargetDepends::AddTargetDepend(
         << "\" of target \"" << depender->GetName() << "\" does not exist.";
         << "\" of target \"" << depender->GetName() << "\" does not exist.";
 
 
       cmListFileBacktrace const* backtrace =
       cmListFileBacktrace const* backtrace =
-        depender->Target->GetUtilityBacktrace(dependee_name);
+        depender->GetUtilityBacktrace(dependee_name);
       if(backtrace)
       if(backtrace)
         {
         {
         cm->IssueMessage(messageType, e.str(), *backtrace);
         cm->IssueMessage(messageType, e.str(), *backtrace);

+ 6 - 0
Source/cmGeneratorTarget.cxx

@@ -1742,6 +1742,12 @@ const std::set<std::string>& cmGeneratorTarget::GetUtilities() const
   return this->Target->GetUtilities();
   return this->Target->GetUtilities();
 }
 }
 
 
+const cmListFileBacktrace*
+cmGeneratorTarget::GetUtilityBacktrace(const std::string& u) const
+{
+  return this->Target->GetUtilityBacktrace(u);
+}
+
 //----------------------------------------------------------------------------
 //----------------------------------------------------------------------------
 bool cmGeneratorTarget::HaveWellDefinedOutputFiles() const
 bool cmGeneratorTarget::HaveWellDefinedOutputFiles() const
 {
 {

+ 2 - 0
Source/cmGeneratorTarget.h

@@ -187,6 +187,8 @@ public:
   const std::vector<std::string>& GetLinkDirectories() const;
   const std::vector<std::string>& GetLinkDirectories() const;
 
 
   std::set<std::string>const& GetUtilities() const;
   std::set<std::string>const& GetUtilities() const;
+  cmListFileBacktrace const* GetUtilityBacktrace(const std::string& u) const;
+
   /** Get the macro to define when building sources in this target.
   /** Get the macro to define when building sources in this target.
       If no macro should be defined null is returned.  */
       If no macro should be defined null is returned.  */
   const char* GetExportMacro() const;
   const char* GetExportMacro() const;