diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmTarget.cxx | 16 | ||||
-rw-r--r-- | Source/cmTarget.h | 1 |
2 files changed, 5 insertions, 12 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 0866d10..9d17320 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -579,16 +579,6 @@ void cmTarget::GetSourceFiles(std::vector<cmSourceFile*> &files) const } //---------------------------------------------------------------------------- -void cmTarget::AddSourceFile(cmSourceFile* sf) -{ - if (std::find(this->SourceFiles.begin(), this->SourceFiles.end(), sf) - == this->SourceFiles.end()) - { - this->SourceFiles.push_back(sf); - } -} - -//---------------------------------------------------------------------------- void cmTarget::AddSources(std::vector<std::string> const& srcs) { for(std::vector<std::string>::const_iterator i = srcs.begin(); @@ -653,7 +643,11 @@ cmSourceFile* cmTarget::AddSourceCMP0049(const std::string& s) cmSourceFile* cmTarget::AddSource(const std::string& src) { cmSourceFile* sf = this->Makefile->GetOrCreateSource(src); - this->AddSourceFile(sf); + if (std::find(this->SourceFiles.begin(), this->SourceFiles.end(), sf) + == this->SourceFiles.end()) + { + this->SourceFiles.push_back(sf); + } return sf; } diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 8df9bd8..e9e3622 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -137,7 +137,6 @@ public: */ void GetSourceFiles(std::vector<std::string> &files) const; void GetSourceFiles(std::vector<cmSourceFile*> &files) const; - void AddSourceFile(cmSourceFile* sf); std::vector<std::string> const& GetObjectLibraries() const { return this->ObjectLibraries; |