| 282 | } |
| 283 | |
| 284 | bool 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 | |
| 309 | bool cmExportSbomGenerator::NoteLinkedTarget( |
| 310 | cmGeneratorTarget const* target, std::string const& linkedName, |
no test coverage detected