| 492 | } |
| 493 | |
| 494 | cmCPackComponent* cmCPackIFWGenerator::GetComponent( |
| 495 | std::string const& projectName, std::string const& componentName) |
| 496 | { |
| 497 | auto cit = this->Components.find(componentName); |
| 498 | if (cit != this->Components.end()) { |
| 499 | return &(cit->second); |
| 500 | } |
| 501 | |
| 502 | cmCPackComponent* component = |
| 503 | this->cmCPackGenerator::GetComponent(projectName, componentName); |
| 504 | if (!component) { |
| 505 | return component; |
| 506 | } |
| 507 | |
| 508 | std::string name = this->GetComponentPackageName(component); |
| 509 | auto pit = this->Packages.find(name); |
| 510 | if (pit != this->Packages.end()) { |
| 511 | return component; |
| 512 | } |
| 513 | |
| 514 | cmCPackIFWPackage* package = &this->Packages[name]; |
| 515 | package->Name = name; |
| 516 | package->Generator = this; |
| 517 | if (package->ConfigureFromComponent(component)) { |
| 518 | package->Installer = &this->Installer; |
| 519 | this->Installer.Packages.insert( |
| 520 | std::pair<std::string, cmCPackIFWPackage*>(name, package)); |
| 521 | this->ComponentPackages.insert( |
| 522 | std::pair<cmCPackComponent*, cmCPackIFWPackage*>(component, package)); |
| 523 | if (component->IsDownloaded) { |
| 524 | this->DownloadedPackages.insert(package); |
| 525 | } else { |
| 526 | this->BinaryPackages.insert(package); |
| 527 | } |
| 528 | } else { |
| 529 | this->Packages.erase(name); |
| 530 | cmCPackIFWLogger(ERROR, |
| 531 | "Cannot configure package \"" |
| 532 | << name << "\" for component \"" << component->Name |
| 533 | << "\"" << std::endl); |
| 534 | } |
| 535 | |
| 536 | return component; |
| 537 | } |
| 538 | |
| 539 | cmCPackComponentGroup* cmCPackIFWGenerator::GetComponentGroup( |
| 540 | std::string const& projectName, std::string const& groupName) |
nothing calls this directly
no test coverage detected