diff options
author | Brad King <brad.king@kitware.com> | 2013-07-31 12:48:19 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-07-31 12:48:19 (GMT) |
commit | 6e2da4a4d3a34f62ec830720ab47d344ada73441 (patch) | |
tree | cfa3106ec0fdfe8a8eeaf16e4a34f3f0d33b082e /Source/cmSystemTools.cxx | |
parent | 8e475470bec1761b9ab338f495e33b145e0ff22e (diff) | |
parent | 2b473d2eaa2d09a69fc5a4f37d24ad051d5ead9a (diff) | |
download | CMake-6e2da4a4d3a34f62ec830720ab47d344ada73441.zip CMake-6e2da4a4d3a34f62ec830720ab47d344ada73441.tar.gz CMake-6e2da4a4d3a34f62ec830720ab47d344ada73441.tar.bz2 |
Merge topic 'passthru'
2b473d2 Add option to use stdout/stderr of original terminal in cmake --build
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r-- | Source/cmSystemTools.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 37344dc..9ec4938 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -638,6 +638,12 @@ bool cmSystemTools::RunSingleCommand(std::vector<cmStdString>const& command, cmsysProcess_SetOption(cp, cmsysProcess_Option_HideWindow, 1); } + if (outputflag == OUTPUT_PASSTHROUGH) + { + cmsysProcess_SetPipeShared(cp, cmsysProcess_Pipe_STDOUT, 1); + cmsysProcess_SetPipeShared(cp, cmsysProcess_Pipe_STDERR, 1); + } + cmsysProcess_SetTimeout(cp, timeout); cmsysProcess_Execute(cp); @@ -645,7 +651,7 @@ bool cmSystemTools::RunSingleCommand(std::vector<cmStdString>const& command, char* data; int length; int pipe; - if ( output || outputflag != OUTPUT_NONE ) + if(outputflag != OUTPUT_PASSTHROUGH && (output || outputflag != OUTPUT_NONE)) { while((pipe = cmsysProcess_WaitForData(cp, &data, &length, 0)) > 0) { |