mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-26 04:09:35 +03:00
Eclipse: Fix extra generator to not crash on interface libraries
Do not process interface libraries in ways that expect build information
to be present internally. This filtering was left out of the extra
generator accidentally when interface libraries were introduced, but it
worked by accident until commit 76ad2ecb50 (Order SYSTEM include
directories after non-system directories, 2018-04-13, v3.12.0-rc1~179^2)
added a code path that was not tolerated.
Fixes: #18363
This commit is contained in:
@@ -845,6 +845,9 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
|
||||
const std::vector<cmGeneratorTarget*>& targets =
|
||||
lgen->GetGeneratorTargets();
|
||||
for (cmGeneratorTarget* target : targets) {
|
||||
if (target->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
|
||||
continue;
|
||||
}
|
||||
std::vector<std::string> includeDirs;
|
||||
std::string config = mf->GetSafeDefinition("CMAKE_BUILD_TYPE");
|
||||
lgen->GetIncludeDirectories(includeDirs, target, "C", config);
|
||||
@@ -971,6 +974,8 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
|
||||
virtDir, "", "");
|
||||
}
|
||||
} break;
|
||||
case cmStateEnums::INTERFACE_LIBRARY:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user