浏览代码

cmGeneratorTarget: Add GetUtilityBacktrace API

Stephen Kelly 10 年之前
父节点
当前提交
7a1b83cb3f
共有 3 个文件被更改,包括 9 次插入1 次删除
  1. 1 1
      Source/cmComputeTargetDepends.cxx
  2. 6 0
      Source/cmGeneratorTarget.cxx
  3. 2 0
      Source/cmGeneratorTarget.h

+ 1 - 1
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);

+ 6 - 0
Source/cmGeneratorTarget.cxx

@@ -1742,6 +1742,12 @@ const std::set<std::string>& 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
 {

+ 2 - 0
Source/cmGeneratorTarget.h

@@ -187,6 +187,8 @@ public:
   const std::vector<std::string>& GetLinkDirectories() 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.
       If no macro should be defined null is returned.  */
   const char* GetExportMacro() const;