cmGeneratorTarget: Replace set insert algorithm with cmRemoveDuplicates.
This commit is contained in:
parent
b3a0c6e08f
commit
ee5bc006eb
|
@ -528,23 +528,22 @@ cmGeneratorTarget::UseObjectLibraries(std::vector<std::string>& objs,
|
||||||
std::vector<cmSourceFile const*> objectFiles;
|
std::vector<cmSourceFile const*> objectFiles;
|
||||||
this->GetExternalObjects(objectFiles, config);
|
this->GetExternalObjects(objectFiles, config);
|
||||||
std::vector<cmTarget*> objectLibraries;
|
std::vector<cmTarget*> objectLibraries;
|
||||||
std::set<cmTarget*> emitted;
|
|
||||||
for(std::vector<cmSourceFile const*>::const_iterator
|
for(std::vector<cmSourceFile const*>::const_iterator
|
||||||
it = objectFiles.begin(); it != objectFiles.end(); ++it)
|
it = objectFiles.begin(); it != objectFiles.end(); ++it)
|
||||||
{
|
{
|
||||||
std::string objLib = (*it)->GetObjectLibrary();
|
std::string objLib = (*it)->GetObjectLibrary();
|
||||||
if (cmTarget* tgt = this->Makefile->FindTargetToUse(objLib))
|
if (cmTarget* tgt = this->Makefile->FindTargetToUse(objLib))
|
||||||
{
|
{
|
||||||
if (emitted.insert(tgt).second)
|
objectLibraries.push_back(tgt);
|
||||||
{
|
|
||||||
objectLibraries.push_back(tgt);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::vector<cmTarget*>::const_iterator end
|
||||||
|
= cmRemoveDuplicates(objectLibraries);
|
||||||
|
|
||||||
for(std::vector<cmTarget*>::const_iterator
|
for(std::vector<cmTarget*>::const_iterator
|
||||||
ti = objectLibraries.begin();
|
ti = objectLibraries.begin();
|
||||||
ti != objectLibraries.end(); ++ti)
|
ti != end; ++ti)
|
||||||
{
|
{
|
||||||
cmTarget* objLib = *ti;
|
cmTarget* objLib = *ti;
|
||||||
cmGeneratorTarget* ogt =
|
cmGeneratorTarget* ogt =
|
||||||
|
|
Loading…
Reference in New Issue