diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 1971610055..03364bd2bd 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -615,7 +615,7 @@ bool cmSystemTools::RunSingleCommand(std::vectorconst& command, int pipe; if ( output || outputflag != OUTPUT_NONE ) { - while((pipe = cmsysProcess_WaitForData(cp, &data, &length, 0))) + while((pipe = cmsysProcess_WaitForData(cp, &data, &length, 0)) > 0) { if(output || outputflag != OUTPUT_NONE) {