summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.h
diff options
context:
space:
mode:
authorJohan Björk <phb@spotify.com>2011-07-26 07:26:18 (GMT)
committerBrad King <brad.king@kitware.com>2011-07-28 14:42:03 (GMT)
commit856a9e499f299a33cb4f763bf36a75524a03e4f5 (patch)
tree794e18a7cef0ec581600e271ffd0a7a842d4a6a2 /Source/cmSystemTools.h
parent4096066723ec7dd6f450e1c8da13616c0ca2f124 (diff)
downloadCMake-856a9e499f299a33cb4f763bf36a75524a03e4f5.zip
CMake-856a9e499f299a33cb4f763bf36a75524a03e4f5.tar.gz
CMake-856a9e499f299a33cb4f763bf36a75524a03e4f5.tar.bz2
RunSingleCommand: Replace verbose boolean with enum
No behaviour change, this prepares for adding a flag to skip the merging of output streams.
Diffstat (limited to 'Source/cmSystemTools.h')
-rw-r--r--Source/cmSystemTools.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h
index f434390..bf513ad 100644
--- a/Source/cmSystemTools.h
+++ b/Source/cmSystemTools.h
@@ -191,11 +191,12 @@ public:
int &retVal, const char* directory = 0,
bool verbose = true, int timeout = 0);
/**
- * Run a single executable command and put the stdout and stderr
- * in output.
+ * Run a single executable command
*
- * If verbose is false, no user-viewable output from the program
- * being run will be generated.
+ * Output is controlled with outputflag. If outputflag is OUTPUT_NONE, no
+ * user-viewable output from the program being run will be generated.
+ * OUTPUT_MERGE is the legacy behaviour where stdout and stderr are merged
+ * into stdout.
*
* If timeout is specified, the command will be terminated after
* timeout expires. Timeout is specified in seconds.
@@ -210,9 +211,14 @@ public:
* it into this function or it will not work. The command must be correctly
* escaped for this to with spaces.
*/
+ enum OutputOption
+ {
+ OUTPUT_NONE = 0,
+ OUTPUT_MERGE
+ };
static bool RunSingleCommand(const char* command, std::string* output = 0,
int* retVal = 0, const char* dir = 0,
- bool verbose = true,
+ OutputOption outputflag = OUTPUT_MERGE,
double timeout = 0.0);
/**
* In this version of RunSingleCommand, command[0] should be
@@ -222,7 +228,7 @@ public:
static bool RunSingleCommand(std::vector<cmStdString> const& command,
std::string* output = 0,
int* retVal = 0, const char* dir = 0,
- bool verbose = true,
+ OutputOption outputflag = OUTPUT_MERGE,
double timeout = 0.0);
/**