"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Source/cmExecProgramCommand.cxx" between
cmake-3.13.4.tar.gz and cmake-3.14.0-rc1.tar.gz

About: CMake is a cross-platform build system designed to build, test and package software. Release candidate.

cmExecProgramCommand.cxx  (cmake-3.13.4):cmExecProgramCommand.cxx  (cmake-3.14.0-rc1)
skipping to change at line 220 skipping to change at line 220
#endif #endif
cmsysProcess_Execute(cp); cmsysProcess_Execute(cp);
// Read the process output. // Read the process output.
int length; int length;
char* data; char* data;
int p; int p;
cmProcessOutput processOutput(encoding); cmProcessOutput processOutput(encoding);
std::string strdata; std::string strdata;
while ((p = cmsysProcess_WaitForData(cp, &data, &length, nullptr), p)) { while ((p = cmsysProcess_WaitForData(cp, &data, &length, nullptr))) {
if (p == cmsysProcess_Pipe_STDOUT || p == cmsysProcess_Pipe_STDERR) { if (p == cmsysProcess_Pipe_STDOUT || p == cmsysProcess_Pipe_STDERR) {
if (verbose) { if (verbose) {
processOutput.DecodeText(data, length, strdata); processOutput.DecodeText(data, length, strdata);
cmSystemTools::Stdout(strdata.c_str(), strdata.size()); cmSystemTools::Stdout(strdata);
} }
output.append(data, length); output.append(data, length);
} }
} }
if (verbose) { if (verbose) {
processOutput.DecodeText(std::string(), strdata); processOutput.DecodeText(std::string(), strdata);
if (!strdata.empty()) { if (!strdata.empty()) {
cmSystemTools::Stdout(strdata.c_str(), strdata.size()); cmSystemTools::Stdout(strdata);
} }
} }
// All output has been read. Wait for the process to exit. // All output has been read. Wait for the process to exit.
cmsysProcess_WaitForExit(cp, nullptr); cmsysProcess_WaitForExit(cp, nullptr);
processOutput.DecodeText(output, output); processOutput.DecodeText(output, output);
// Check the result of running the process. // Check the result of running the process.
std::string msg; std::string msg;
switch (cmsysProcess_GetState(cp)) { switch (cmsysProcess_GetState(cp)) {
skipping to change at line 273 skipping to change at line 273
#if defined(_WIN32) && !defined(__CYGWIN__) #if defined(_WIN32) && !defined(__CYGWIN__)
// Old Windows process execution printed this info. // Old Windows process execution printed this info.
msg += "\n\nfor command: "; msg += "\n\nfor command: ";
msg += command; msg += command;
if (dir) { if (dir) {
msg += "\nin dir: "; msg += "\nin dir: ";
msg += dir; msg += dir;
} }
msg += "\n"; msg += "\n";
if (verbose) { if (verbose) {
cmSystemTools::Stdout(msg.c_str()); cmSystemTools::Stdout(msg);
} }
output += msg; output += msg;
#else #else
// Old UNIX process execution only put message in output. // Old UNIX process execution only put message in output.
output += msg; output += msg;
#endif #endif
} }
// Delete the process instance. // Delete the process instance.
cmsysProcess_Delete(cp); cmsysProcess_Delete(cp);
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)