From d3dcf8d7745a1f1435797cb3a1451ef4ddb7ce2c Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 20 Mar 2019 10:48:28 -0400 Subject: 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 --- Source/cmExtraEclipseCDT4Generator.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index 30067b7..e05f74b 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -845,6 +845,9 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const const std::vector& targets = lgen->GetGeneratorTargets(); for (cmGeneratorTarget* target : targets) { + if (target->GetType() == cmStateEnums::INTERFACE_LIBRARY) { + continue; + } std::vector 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; } -- cgit v0.12