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

Method GenerateCMakeBuildCommand

Source/cmGlobalGenerator.cxx:2454–2482  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2452}
2453
2454std::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
2484void cmGlobalGenerator::AddMakefile(std::unique_ptr<cmMakefile> mf)
2485{

Callers 4

MainSignatureFunction · 0.80
TwoArgsSignatureFunction · 0.80
InitializeHandlerMethod · 0.80
RunPreinstallTargetMethod · 0.80

Calls 3

cmStrCatFunction · 0.70
emptyMethod · 0.45

Tested by 1

InitializeHandlerMethod · 0.64