cmGeneratorTarget: use erase-unique instead of reinitialization
Just to make it easier to find places where containers are cleared in order to be recomputed.
This commit is contained in:
parent
3b3622305b
commit
52052ef88b
|
@ -839,14 +839,10 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(
|
||||||
&dagChecker, result, excludeImported);
|
&dagChecker, result, excludeImported);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::set<std::string> unique;
|
std::for_each(result.begin(), result.end(),
|
||||||
for (std::vector<std::string>::iterator li = result.begin();
|
cmSystemTools::ConvertToUnixSlashes);
|
||||||
li != result.end(); ++li) {
|
std::sort(result.begin(), result.end());
|
||||||
cmSystemTools::ConvertToUnixSlashes(*li);
|
result.erase(std::unique(result.begin(), result.end()), result.end());
|
||||||
unique.insert(*li);
|
|
||||||
}
|
|
||||||
result.clear();
|
|
||||||
result.insert(result.end(), unique.begin(), unique.end());
|
|
||||||
|
|
||||||
IncludeCacheType::value_type entry(config_upper, result);
|
IncludeCacheType::value_type entry(config_upper, result);
|
||||||
iter = this->SystemIncludesCache.insert(entry).first;
|
iter = this->SystemIncludesCache.insert(entry).first;
|
||||||
|
|
Loading…
Reference in New Issue