summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2012-09-15 18:46:51 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-10-30 20:16:29 (GMT)
commitfa037776264a9ae554ed4e0a25f4e9f11f570524 (patch)
tree14db8e26651f57b2cf281c798449729deb6679a7
parent638843af984281c67edcc9ea9e05712ac9075d04 (diff)
downloadCMake-fa037776264a9ae554ed4e0a25f4e9f11f570524.zip
CMake-fa037776264a9ae554ed4e0a25f4e9f11f570524.tar.gz
CMake-fa037776264a9ae554ed4e0a25f4e9f11f570524.tar.bz2
Do not populate SourceEntries in AddSourceFile.
It only generates a default constructed SourceEntry for each cmSourceFile. this->Internal->SourceEntries[sf]; in cmTargetTraceDependencies::Trace has the same effect, and is called early in generation-time for each source file anyway.
-rw-r--r--Source/cmTarget.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 0c9e8f0..5ef63a3 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -799,12 +799,10 @@ std::vector<cmSourceFile*> const& cmTarget::GetSourceFiles()
void cmTarget::AddSourceFile(cmSourceFile* sf)
{
typedef cmTargetInternals::SourceEntriesType SourceEntriesType;
- SourceEntriesType::iterator i = this->Internal->SourceEntries.find(sf);
- if(i == this->Internal->SourceEntries.end())
+ if (std::find(this->SourceFiles.begin(), this->SourceFiles.end(), sf)
+ == this->SourceFiles.end())
{
typedef cmTargetInternals::SourceEntry SourceEntry;
- SourceEntriesType::value_type entry(sf, SourceEntry());
- i = this->Internal->SourceEntries.insert(entry).first;
this->SourceFiles.push_back(sf);
}
}