mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-20 06:00:30 -06:00
Merge topic 'objlib-dedup'
66c0b36d objlib: fix unchecked insertions in `cmGeneratorTarget::GetLanguages`
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1609
This commit is contained in:
@@ -5133,7 +5133,12 @@ void cmGeneratorTarget::GetLanguages(std::set<std::string>& languages,
|
||||
std::string objLib = extObj->GetObjectLibrary();
|
||||
if (cmGeneratorTarget* tgt =
|
||||
this->LocalGenerator->FindGeneratorTargetToUse(objLib)) {
|
||||
objectLibraries.push_back(tgt);
|
||||
auto const objLibIt =
|
||||
std::find_if(objectLibraries.cbegin(), objectLibraries.cend(),
|
||||
[tgt](cmGeneratorTarget* t) { return t == tgt; });
|
||||
if (objectLibraries.cend() == objLibIt) {
|
||||
objectLibraries.push_back(tgt);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user