| 46 | using UseTo = cmGeneratorTarget::UseTo; |
| 47 | |
| 48 | void AddObjectEntries(cmGeneratorTarget const* headTarget, |
| 49 | cm::GenEx::Context const& context, |
| 50 | cmGeneratorExpressionDAGChecker* dagChecker, |
| 51 | EvaluatedTargetPropertyEntries& entries) |
| 52 | { |
| 53 | if (cmLinkImplementationLibraries const* impl = |
| 54 | headTarget->GetLinkImplementationLibraries(context.Config, |
| 55 | UseTo::Link)) { |
| 56 | entries.HadContextSensitiveCondition = impl->HadContextSensitiveCondition; |
| 57 | for (cmLinkItem const& lib : impl->Libraries) { |
| 58 | if (lib.Target && |
| 59 | lib.Target->GetType() == cmStateEnums::OBJECT_LIBRARY) { |
| 60 | std::string uniqueName = |
| 61 | headTarget->GetGlobalGenerator()->IndexGeneratorTargetUniquely( |
| 62 | lib.Target); |
| 63 | std::string genex = |
| 64 | cmStrCat("$<TARGET_OBJECTS:", std::move(uniqueName), '>'); |
| 65 | cmGeneratorExpression ge(*headTarget->Makefile->GetCMakeInstance(), |
| 66 | lib.Backtrace); |
| 67 | std::unique_ptr<cmCompiledGeneratorExpression> cge = |
| 68 | ge.Parse(std::move(genex)); |
| 69 | cge->SetEvaluateForBuildsystem(true); |
| 70 | |
| 71 | EvaluatedTargetPropertyEntry ee(lib, lib.Backtrace); |
| 72 | cmExpandList(cge->Evaluate(context, dagChecker, headTarget), |
| 73 | ee.Values); |
| 74 | if (cge->GetHadContextSensitiveCondition()) { |
| 75 | ee.ContextDependent = true; |
| 76 | } |
| 77 | entries.Entries.emplace_back(std::move(ee)); |
| 78 | } |
| 79 | } |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | void addFileSetEntry(cmGeneratorTarget const* headTarget, |
| 84 | cm::GenEx::Context const& context, |
no test coverage detected
searching dependent graphs…