cmTarget: Add API for generate-time source addition.

This method is a refactoring artifact.  It will be removed in a
follow-up.
This commit is contained in:
Stephen Kelly 2015-09-12 21:29:33 +02:00
parent c38e30f68c
commit 64f73150b8
3 changed files with 7 additions and 1 deletions

View File

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

View File

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

View File

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