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.
This commit is contained in:
parent
638843af98
commit
fa03777626
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue