| 345 | } |
| 346 | |
| 347 | bool cmExportFileGenerator::AddTargetNamespace(std::string& input, |
| 348 | cmGeneratorTarget const* target, |
| 349 | cmLocalGenerator const* lg) |
| 350 | { |
| 351 | cmGeneratorTarget::TargetOrString resolved = |
| 352 | target->ResolveTargetReference(input, lg); |
| 353 | |
| 354 | cmGeneratorTarget* tgt = resolved.Target; |
| 355 | if (!tgt) { |
| 356 | input = resolved.String; |
| 357 | return false; |
| 358 | } |
| 359 | |
| 360 | cmFindPackageStack const& pkgStack = tgt->Target->GetFindPackageStack(); |
| 361 | if (!pkgStack.Empty() || |
| 362 | tgt->Target->GetProperty("EXPORT_FIND_PACKAGE_NAME")) { |
| 363 | this->ExternalTargets.emplace(tgt); |
| 364 | } |
| 365 | |
| 366 | if (tgt->IsImported()) { |
| 367 | input = tgt->GetName(); |
| 368 | return this->NoteLinkedTarget(target, input, tgt); |
| 369 | } |
| 370 | |
| 371 | if (this->ExportedTargets.find(tgt) != this->ExportedTargets.end()) { |
| 372 | input = this->Namespace + tgt->GetExportName(); |
| 373 | } else { |
| 374 | std::string namespacedTarget; |
| 375 | this->HandleMissingTarget(namespacedTarget, target, tgt); |
| 376 | if (!namespacedTarget.empty()) { |
| 377 | input = namespacedTarget; |
| 378 | } else { |
| 379 | input = tgt->GetName(); |
| 380 | } |
| 381 | } |
| 382 | |
| 383 | return this->NoteLinkedTarget(target, input, tgt); |
| 384 | } |
| 385 | |
| 386 | void cmExportFileGenerator::ResolveTargetsInGeneratorExpressions( |
| 387 | std::string& input, cmGeneratorTarget const* target, |
no test coverage detected