MCPcopy Create free account
hub / github.com/Kitware/CMake / AddObjectEntries

Function AddObjectEntries

Source/cmGeneratorTarget_Sources.cxx:48–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46using UseTo = cmGeneratorTarget::UseTo;
47
48void 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
83void addFileSetEntry(cmGeneratorTarget const* headTarget,
84 cm::GenEx::Context const& context,

Callers 1

GetSourceFilePathsMethod · 0.85

Calls 13

moveFunction · 0.85
cmExpandListFunction · 0.85
emplace_backMethod · 0.80
cmStrCatFunction · 0.70
GetTypeMethod · 0.45
GetGlobalGeneratorMethod · 0.45
GetCMakeInstanceMethod · 0.45
ParseMethod · 0.45
EvaluateMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…