| 2452 | } |
| 2453 | |
| 2454 | std::string cmGlobalGenerator::GenerateCMakeBuildCommand( |
| 2455 | std::string const& target, std::string const& config, |
| 2456 | std::string const& parallel, std::string const& native, bool ignoreErrors) |
| 2457 | { |
| 2458 | std::string makeCommand = cmSystemTools::GetCMakeCommand(); |
| 2459 | makeCommand = |
| 2460 | cmStrCat(cmSystemTools::ConvertToOutputPath(makeCommand), " --build ."); |
| 2461 | if (!config.empty()) { |
| 2462 | makeCommand = cmStrCat(makeCommand, " --config \"", config, '"'); |
| 2463 | } |
| 2464 | if (!parallel.empty()) { |
| 2465 | makeCommand = cmStrCat(makeCommand, " --parallel \"", parallel, '"'); |
| 2466 | } |
| 2467 | if (!target.empty()) { |
| 2468 | makeCommand = cmStrCat(makeCommand, " --target \"", target, '"'); |
| 2469 | } |
| 2470 | char const* sep = " -- "; |
| 2471 | if (ignoreErrors) { |
| 2472 | char const* iflag = this->GetBuildIgnoreErrorsFlag(); |
| 2473 | if (iflag && *iflag) { |
| 2474 | makeCommand = cmStrCat(makeCommand, sep, iflag); |
| 2475 | sep = " "; |
| 2476 | } |
| 2477 | } |
| 2478 | if (!native.empty()) { |
| 2479 | makeCommand = cmStrCat(makeCommand, sep, native); |
| 2480 | } |
| 2481 | return makeCommand; |
| 2482 | } |
| 2483 | |
| 2484 | void cmGlobalGenerator::AddMakefile(std::unique_ptr<cmMakefile> mf) |
| 2485 | { |