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

Method PopulateLinkLibrariesProperty

Source/cmExportSbomGenerator.cxx:284–307  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

282}
283
284bool cmExportSbomGenerator::PopulateLinkLibrariesProperty(
285 cmGeneratorTarget const* target,
286 cmGeneratorExpression::PreprocessContext preprocessRule,
287 ImportPropertyMap& properties)
288{
289 static std::array<std::string, 3> const linkIfaceProps = {
290 { "LINK_LIBRARIES", "LINK_LIBRARIES_DIRECT",
291 "LINK_LIBRARIES_DIRECT_EXCLUDE" }
292 };
293 bool hadLINK_LIBRARIES = false;
294 for (std::string const& linkIfaceProp : linkIfaceProps) {
295 if (cmValue input = target->GetProperty(linkIfaceProp)) {
296 std::string prepro =
297 cmGeneratorExpression::Preprocess(*input, preprocessRule);
298 if (!prepro.empty()) {
299 this->ResolveTargetsInGeneratorExpressions(prepro, target,
300 ReplaceFreeTargets);
301 properties[linkIfaceProp] = prepro;
302 hadLINK_LIBRARIES = true;
303 }
304 }
305 }
306 return hadLINK_LIBRARIES;
307}
308
309bool cmExportSbomGenerator::NoteLinkedTarget(
310 cmGeneratorTarget const* target, std::string const& linkedName,

Callers 3

GenerateMainFileMethod · 0.80
GenerateMainFileMethod · 0.80

Calls 3

GetPropertyMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected