diff options
author | Brad King <brad.king@kitware.com> | 2015-04-20 15:36:57 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-04-20 15:47:50 -0400 |
commit | 356c26ebdfa053f59b2932c78ae81cba3c872dc3 (patch) | |
tree | 48586b8e866870dc225395280ee8c1123998db65 /Source/cmcmd.cxx | |
parent | f438cd373131b85dd71b1f902c56fb3584cf8f87 (diff) | |
download | cmake-356c26ebdfa053f59b2932c78ae81cba3c872dc3.tar.gz |
cmSystemTools: Teach RunSingleCommand to separate stdout and stderr
Extend the RunSingleCommand signature to capture stdout and stderr
separately. Allow both to be captured to the same std::string
to preserve existing behavior. Update all call sites to do this
so that this refactoring does not introduce functional changes.
Diffstat (limited to 'Source/cmcmd.cxx')
-rw-r--r-- | Source/cmcmd.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 2ef04efdfa..5e56957891 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -267,7 +267,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args) std::vector<std::string> cmd(ai, ae); int retval; if(cmSystemTools::RunSingleCommand( - cmd, 0, &retval, NULL, cmSystemTools::OUTPUT_PASSTHROUGH)) + cmd, 0, 0, &retval, NULL, cmSystemTools::OUTPUT_PASSTHROUGH)) { return retval; } @@ -398,7 +398,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args) time(&time_start); clock_start = clock(); int ret =0; - cmSystemTools::RunSingleCommand(command.c_str(), 0, &ret); + cmSystemTools::RunSingleCommand(command.c_str(), 0, 0, &ret); clock_finish = clock(); time(&time_finish); @@ -454,7 +454,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args) std::string command = cmWrap('"', cmRange(args).advance(3), '"', " "); int retval = 0; int timeout = 0; - if ( cmSystemTools::RunSingleCommand(command.c_str(), 0, &retval, + if ( cmSystemTools::RunSingleCommand(command.c_str(), 0, 0, &retval, directory.c_str(), cmSystemTools::OUTPUT_NORMAL, timeout) ) { return retval; @@ -1350,7 +1350,7 @@ bool cmcmd::RunCommand(const char* comment, int retCode =0; // use rc command to create .res file cmSystemTools::RunSingleCommand(command, - &output, + &output, &output, &retCode, 0, cmSystemTools::OUTPUT_NONE); // always print the output of the command, unless // it is the dumb rc command banner, but if the command |