| 430 | } |
| 431 | |
| 432 | void cmGlobalGhsMultiGenerator::OutputTopLevelProject( |
| 433 | cmLocalGenerator* root, std::vector<cmLocalGenerator*>& generators) |
| 434 | { |
| 435 | std::string fname; |
| 436 | |
| 437 | if (generators.empty()) { |
| 438 | return; |
| 439 | } |
| 440 | |
| 441 | // Collect all targets under this root generator and the transitive |
| 442 | // closure of their dependencies. |
| 443 | TargetDependSet const projectTargets = |
| 444 | this->GetTargetsForProject(root, generators); |
| 445 | OrderedTargetDependSet sortedProjectTargets(projectTargets, ""); |
| 446 | this->ProjectTargets.clear(); |
| 447 | for (cmGeneratorTarget const* t : sortedProjectTargets) { |
| 448 | /* save list of all targets in sorted order */ |
| 449 | this->ProjectTargets.push_back(t); |
| 450 | } |
| 451 | |
| 452 | /* Name top-level projects as filename.top.gpj to avoid name clashes |
| 453 | * with target projects. This avoid the issue where the project has |
| 454 | * the same name as the executable target. |
| 455 | */ |
| 456 | fname = cmStrCat(root->GetCurrentBinaryDirectory(), '/', |
| 457 | root->GetProjectName(), ".top", FILE_EXTENSION); |
| 458 | |
| 459 | cmGeneratedFileStream top(fname); |
| 460 | top.SetCopyIfDifferent(true); |
| 461 | this->WriteTopLevelProject(top, root); |
| 462 | this->WriteTargets(root); |
| 463 | this->WriteSubProjects(top, true); |
| 464 | this->WriteSubProjects(top, false); |
| 465 | top.Close(); |
| 466 | } |
| 467 | |
| 468 | std::vector<cmGlobalGenerator::GeneratedMakeCommand> |
| 469 | cmGlobalGhsMultiGenerator::GenerateBuildCommand( |
no test coverage detected