| 737 | } |
| 738 | |
| 739 | void cmGlobalGhsMultiGenerator::AddAllTarget() |
| 740 | { |
| 741 | // Add a special target that depends on ALL projects for easy build |
| 742 | // of one configuration only. |
| 743 | for (auto const& it : this->ProjectMap) { |
| 744 | std::vector<cmLocalGenerator*> const& gen = it.second; |
| 745 | // add the ALL_BUILD to the first local generator of each project |
| 746 | if (!gen.empty()) { |
| 747 | // Use no actual command lines so that the target itself is not |
| 748 | // considered always out of date. |
| 749 | auto cc = cm::make_unique<cmCustomCommand>(); |
| 750 | cc->SetEscapeOldStyle(false); |
| 751 | cc->SetComment("Build all projects"); |
| 752 | cmTarget* allBuild = gen[0]->AddUtilityCommand(this->GetAllTargetName(), |
| 753 | true, std::move(cc)); |
| 754 | |
| 755 | gen[0]->AddGeneratorTarget( |
| 756 | cm::make_unique<cmGeneratorTarget>(allBuild, gen[0])); |
| 757 | |
| 758 | // Organize in the "predefined targets" folder: |
| 759 | if (this->UseFolderProperty()) { |
| 760 | allBuild->SetProperty("FOLDER", this->GetPredefinedTargetsFolder()); |
| 761 | } |
| 762 | |
| 763 | // Now make all targets depend on the ALL_BUILD target |
| 764 | for (cmLocalGenerator const* i : gen) { |
| 765 | for (auto const& tgt : i->GetGeneratorTargets()) { |
| 766 | // Skip global or imported targets |
| 767 | if (tgt->GetType() == cmStateEnums::GLOBAL_TARGET || |
| 768 | tgt->IsImported()) { |
| 769 | continue; |
| 770 | } |
| 771 | // Skip Exclude From All Targets |
| 772 | if (!this->IsExcluded(gen[0], tgt.get())) { |
| 773 | allBuild->AddUtility(tgt->GetName(), false); |
| 774 | } |
| 775 | } |
| 776 | } |
| 777 | } |
| 778 | } |
| 779 | } |
| 780 | |
| 781 | void cmGlobalGhsMultiGenerator::AddExtraIDETargets() |
| 782 | { |
no test coverage detected