mirror of
https://github.com/reactos/CMake.git
synced 2024-11-25 04:29:52 +00:00
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;
|
||||
this->GetExternalObjects(objectFiles, config);
|
||||
std::vector<cmTarget*> objectLibraries;
|
||||
std::set<cmTarget*> emitted;
|
||||
for(std::vector<cmSourceFile const*>::const_iterator
|
||||
it = objectFiles.begin(); it != objectFiles.end(); ++it)
|
||||
{
|
||||
std::string objLib = (*it)->GetObjectLibrary();
|
||||
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
|
||||
ti = objectLibraries.begin();
|
||||
ti != objectLibraries.end(); ++ti)
|
||||
ti != end; ++ti)
|
||||
{
|
||||
cmTarget* objLib = *ti;
|
||||
cmGeneratorTarget* ogt =
|
||||
|
Loading…
Reference in New Issue
Block a user