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

Method AddAllTarget

Source/cmGlobalGhsMultiGenerator.cxx:739–779  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

737}
738
739void 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
781void cmGlobalGhsMultiGenerator::AddExtraIDETargets()
782{

Callers 1

AddExtraIDETargetsMethod · 0.95

Calls 15

moveFunction · 0.85
SetEscapeOldStyleMethod · 0.80
AddGeneratorTargetMethod · 0.80
UseFolderPropertyMethod · 0.80
AddUtilityMethod · 0.80
emptyMethod · 0.45
SetCommentMethod · 0.45
AddUtilityCommandMethod · 0.45
GetAllTargetNameMethod · 0.45
SetPropertyMethod · 0.45
GetTypeMethod · 0.45

Tested by

no test coverage detected