| 532 | } |
| 533 | |
| 534 | std::vector<cmGlobalGenerator::GeneratedMakeCommand> |
| 535 | cmGlobalUnixMakefileGenerator3::GenerateBuildCommand( |
| 536 | std::string const& makeProgram, std::string const& /*projectName*/, |
| 537 | std::string const& /*projectDir*/, |
| 538 | std::vector<std::string> const& targetNames, std::string const& /*config*/, |
| 539 | int jobs, bool verbose, cmBuildOptions buildOptions, |
| 540 | std::vector<std::string> const& makeOptions, |
| 541 | BuildTryCompile /*isInTryCompile*/) |
| 542 | { |
| 543 | GeneratedMakeCommand makeCommand; |
| 544 | |
| 545 | // Make it possible to set verbosity also from command line |
| 546 | if (verbose) { |
| 547 | makeCommand.Add(cmSystemTools::GetCMakeCommand()); |
| 548 | makeCommand.Add("-E"); |
| 549 | makeCommand.Add("env"); |
| 550 | makeCommand.Add("VERBOSE=1"); |
| 551 | } |
| 552 | makeCommand.Add(this->SelectMakeProgram(makeProgram)); |
| 553 | |
| 554 | // Explicitly tell the make tool to use the Makefile written by |
| 555 | // cmLocalUnixMakefileGenerator3::WriteLocalMakefile |
| 556 | makeCommand.Add("-f"); |
| 557 | makeCommand.Add("Makefile"); |
| 558 | |
| 559 | if (jobs != cmake::NO_BUILD_PARALLEL_LEVEL) { |
| 560 | if (jobs == cmake::DEFAULT_BUILD_PARALLEL_LEVEL) { |
| 561 | makeCommand.Add("-j"); |
| 562 | } else { |
| 563 | makeCommand.Add(cmStrCat("-j", jobs)); |
| 564 | } |
| 565 | } |
| 566 | |
| 567 | makeCommand.Add(makeOptions.begin(), makeOptions.end()); |
| 568 | for (auto tname : targetNames) { |
| 569 | if (!tname.empty()) { |
| 570 | if (buildOptions.Fast) { |
| 571 | tname += "/fast"; |
| 572 | } |
| 573 | cmSystemTools::ConvertToOutputSlashes(tname); |
| 574 | makeCommand.Add(std::move(tname)); |
| 575 | } |
| 576 | } |
| 577 | return { std::move(makeCommand) }; |
| 578 | } |
| 579 | |
| 580 | void cmGlobalUnixMakefileGenerator3::WriteConvenienceRules( |
| 581 | std::ostream& ruleFileStream, std::set<std::string>& emitted) |