瀏覽代碼

cmTarget: Add API for generate-time source addition.

This method is a refactoring artifact.  It will be removed in a
follow-up.
Stephen Kelly 10 年之前
父節點
當前提交
64f73150b8
共有 3 個文件被更改,包括 7 次插入1 次删除
  1. 1 1
      Source/cmGeneratorTarget.cxx
  2. 5 0
      Source/cmTarget.cxx
  3. 1 0
      Source/cmTarget.h

+ 1 - 1
Source/cmGeneratorTarget.cxx

@@ -404,7 +404,7 @@ std::string cmGeneratorTarget::GetOutputName(const std::string& config,
 
 void cmGeneratorTarget::AddSource(const std::string& src)
 {
-  this->Target->AddSource(src);
+  this->Target->AddGenerateTimeSource(src);
 }
 
 void cmGeneratorTarget::AddTracedSources(std::vector<std::string> const& srcs)

+ 5 - 0
Source/cmTarget.cxx

@@ -960,6 +960,11 @@ cmSourceFile* cmTarget::AddSource(const std::string& src)
   return this->Makefile->GetOrCreateSource(src);
 }
 
+void cmTarget::AddGenerateTimeSource(const std::string& src)
+{
+  this->AddSource(src);
+}
+
 //----------------------------------------------------------------------------
 void cmTarget::MergeLinkLibraries( cmMakefile& mf,
                                    const std::string& selfname,

+ 1 - 0
Source/cmTarget.h

@@ -145,6 +145,7 @@ public:
   void AddTracedSources(std::vector<std::string> const& srcs);
   cmSourceFile* AddSourceCMP0049(const std::string& src);
   cmSourceFile* AddSource(const std::string& src);
+  void AddGenerateTimeSource(const std::string& src);
 
   enum LinkLibraryType {GENERAL, DEBUG, OPTIMIZED};