|
@@ -2096,16 +2096,13 @@ int cmGlobalGenerator::Build(
|
|
|
* Run an executable command and put the stdout in output.
|
|
* Run an executable command and put the stdout in output.
|
|
|
*/
|
|
*/
|
|
|
cmWorkingDirectory workdir(bindir);
|
|
cmWorkingDirectory workdir(bindir);
|
|
|
- output += "Change Dir: ";
|
|
|
|
|
- output += bindir;
|
|
|
|
|
- output += "\n";
|
|
|
|
|
|
|
+ output += cmStrCat("Change Dir: ", bindir, '\n');
|
|
|
if (workdir.Failed()) {
|
|
if (workdir.Failed()) {
|
|
|
cmSystemTools::SetRunCommandHideConsole(hideconsole);
|
|
cmSystemTools::SetRunCommandHideConsole(hideconsole);
|
|
|
std::string err = cmStrCat("Failed to change directory: ",
|
|
std::string err = cmStrCat("Failed to change directory: ",
|
|
|
std::strerror(workdir.GetLastResult()));
|
|
std::strerror(workdir.GetLastResult()));
|
|
|
cmSystemTools::Error(err);
|
|
cmSystemTools::Error(err);
|
|
|
- output += err;
|
|
|
|
|
- output += "\n";
|
|
|
|
|
|
|
+ output += cmStrCat(err, '\n');
|
|
|
return 1;
|
|
return 1;
|
|
|
}
|
|
}
|
|
|
std::string realConfig = config;
|
|
std::string realConfig = config;
|
|
@@ -2134,9 +2131,8 @@ int cmGlobalGenerator::Build(
|
|
|
this->GenerateBuildCommand(makeCommandCSTR, projectName, bindir,
|
|
this->GenerateBuildCommand(makeCommandCSTR, projectName, bindir,
|
|
|
{ "clean" }, realConfig, jobs, verbose,
|
|
{ "clean" }, realConfig, jobs, verbose,
|
|
|
buildOptions);
|
|
buildOptions);
|
|
|
- output += "\nRun Clean Command:";
|
|
|
|
|
- output += cleanCommand.front().Printable();
|
|
|
|
|
- output += "\n";
|
|
|
|
|
|
|
+ output +=
|
|
|
|
|
+ cmStrCat("\nRun Clean Command:", cleanCommand.front().Printable(), '\n');
|
|
|
if (cleanCommand.size() != 1) {
|
|
if (cleanCommand.size() != 1) {
|
|
|
this->GetCMakeInstance()->IssueMessage(MessageType::INTERNAL_ERROR,
|
|
this->GetCMakeInstance()->IssueMessage(MessageType::INTERNAL_ERROR,
|
|
|
"The generator did not produce "
|
|
"The generator did not produce "
|
|
@@ -2149,8 +2145,8 @@ int cmGlobalGenerator::Build(
|
|
|
nullptr, outputflag, timeout)) {
|
|
nullptr, outputflag, timeout)) {
|
|
|
cmSystemTools::SetRunCommandHideConsole(hideconsole);
|
|
cmSystemTools::SetRunCommandHideConsole(hideconsole);
|
|
|
cmSystemTools::Error("Generator: execution of make clean failed.");
|
|
cmSystemTools::Error("Generator: execution of make clean failed.");
|
|
|
- output += *outputPtr;
|
|
|
|
|
- output += "\nGenerator: execution of make clean failed.\n";
|
|
|
|
|
|
|
+ output +=
|
|
|
|
|
+ cmStrCat(*outputPtr, "\nGenerator: execution of make clean failed.\n");
|
|
|
|
|
|
|
|
return 1;
|
|
return 1;
|
|
|
}
|
|
}
|
|
@@ -2177,9 +2173,10 @@ int cmGlobalGenerator::Build(
|
|
|
cmSystemTools::Error(
|
|
cmSystemTools::Error(
|
|
|
"Generator: execution of make failed. Make command was: " +
|
|
"Generator: execution of make failed. Make command was: " +
|
|
|
makeCommandStr);
|
|
makeCommandStr);
|
|
|
- output += *outputPtr;
|
|
|
|
|
- output += "\nGenerator: execution of make failed. Make command was: " +
|
|
|
|
|
- makeCommandStr + "\n";
|
|
|
|
|
|
|
+ output +=
|
|
|
|
|
+ cmStrCat(*outputPtr,
|
|
|
|
|
+ "\nGenerator: execution of make failed. Make command was: ",
|
|
|
|
|
+ makeCommandStr, '\n');
|
|
|
|
|
|
|
|
return 1;
|
|
return 1;
|
|
|
}
|
|
}
|