summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-03-17 17:45:37 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-03-31 21:18:43 (GMT)
commit59e8740acaf0b749e8a7028f168a6a6d6d69194f (patch)
tree8233ed7ced2f3b5b619a6dff1d46339dbfe193bf /Source
parent26d494ba01809553e335cca4f925d14dab2c50f7 (diff)
downloadCMake-59e8740acaf0b749e8a7028f168a6a6d6d69194f.zip
CMake-59e8740acaf0b749e8a7028f168a6a6d6d69194f.tar.gz
CMake-59e8740acaf0b749e8a7028f168a6a6d6d69194f.tar.bz2
cmTarget: Remove AddSourceFile method
It is no longer used.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmTarget.cxx16
-rw-r--r--Source/cmTarget.h1
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;