Commit fa037776 authored by Stephen Kelly's avatar Stephen Kelly
Browse files

Do not populate SourceEntries in AddSourceFile.

It only generates a default constructed SourceEntry for each


in cmTargetTraceDependencies::Trace has the same effect, and is called
early in generation-time for each source file anyway.
parent 638843af
...@@ -799,12 +799,10 @@ std::vector<cmSourceFile*> const& cmTarget::GetSourceFiles() ...@@ -799,12 +799,10 @@ std::vector<cmSourceFile*> const& cmTarget::GetSourceFiles()
void cmTarget::AddSourceFile(cmSourceFile* sf) void cmTarget::AddSourceFile(cmSourceFile* sf)
{ {
typedef cmTargetInternals::SourceEntriesType SourceEntriesType; typedef cmTargetInternals::SourceEntriesType SourceEntriesType;
SourceEntriesType::iterator i = this->Internal->SourceEntries.find(sf); if (std::find(this->SourceFiles.begin(), this->SourceFiles.end(), sf)
if(i == this->Internal->SourceEntries.end()) == this->SourceFiles.end())
{ {
typedef cmTargetInternals::SourceEntry SourceEntry; typedef cmTargetInternals::SourceEntry SourceEntry;
SourceEntriesType::value_type entry(sf, SourceEntry());
i = this->Internal->SourceEntries.insert(entry).first;
this->SourceFiles.push_back(sf); this->SourceFiles.push_back(sf);
} }
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment