summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-04-20 19:36:57 (GMT)
committerBrad King <brad.king@kitware.com>2015-04-20 19:47:50 (GMT)
commit356c26ebdfa053f59b2932c78ae81cba3c872dc3 (patch)
tree48586b8e866870dc225395280ee8c1123998db65 /Source/cmSystemTools.h
parentf438cd373131b85dd71b1f902c56fb3584cf8f87 (diff)
downloadCMake-356c26ebdfa053f59b2932c78ae81cba3c872dc3.zip
CMake-356c26ebdfa053f59b2932c78ae81cba3c872dc3.tar.gz
CMake-356c26ebdfa053f59b2932c78ae81cba3c872dc3.tar.bz2
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/cmSystemTools.h')
-rw-r--r--Source/cmSystemTools.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h
index 433ef46..6feb6c5 100644
--- a/Source/cmSystemTools.h
+++ b/Source/cmSystemTools.h
@@ -223,7 +223,9 @@ public:
OUTPUT_NORMAL,
OUTPUT_PASSTHROUGH
};
- static bool RunSingleCommand(const char* command, std::string* output = 0,
+ static bool RunSingleCommand(const char* command,
+ std::string* captureStdOut = 0,
+ std::string* captureStdErr = 0,
int* retVal = 0, const char* dir = 0,
OutputOption outputflag = OUTPUT_MERGE,
double timeout = 0.0);
@@ -233,7 +235,8 @@ public:
* be in comand[1]...command[command.size()]
*/
static bool RunSingleCommand(std::vector<std::string> const& command,
- std::string* output = 0,
+ std::string* captureStdOut = 0,
+ std::string* captureStdErr = 0,
int* retVal = 0, const char* dir = 0,
OutputOption outputflag = OUTPUT_MERGE,
double timeout = 0.0);