diff options
Diffstat (limited to 'Source/cmSystemTools.h')
-rw-r--r-- | Source/cmSystemTools.h | 18 |
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); /** |