summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.h
diff options
context:
space:
mode:
authorJohan Björk <phb@spotify.com>2011-07-26 07:36:40 (GMT)
committerBrad King <brad.king@kitware.com>2011-07-28 14:43:09 (GMT)
commit642f10066a5c9b33e8736b9ca013a44023c21b2c (patch)
treec6e63fd944f9e04b588009c67148d75ca5b3b5d0 /Source/cmSystemTools.h
parent856a9e499f299a33cb4f763bf36a75524a03e4f5 (diff)
downloadCMake-642f10066a5c9b33e8736b9ca013a44023c21b2c.zip
CMake-642f10066a5c9b33e8736b9ca013a44023c21b2c.tar.gz
CMake-642f10066a5c9b33e8736b9ca013a44023c21b2c.tar.bz2
RunSingleCommand: Add a OUTPUT_NORMAL flag.
OUTPUT_NORMAL does no processing of the output streams, it just passes them through the same streams as they were received on.
Diffstat (limited to 'Source/cmSystemTools.h')
-rw-r--r--Source/cmSystemTools.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h
index bf513ad..641c89f 100644
--- a/Source/cmSystemTools.h
+++ b/Source/cmSystemTools.h
@@ -75,6 +75,9 @@ public:
typedef void (*StdoutCallback)(const char*, int length, void*);
static void SetStdoutCallback(StdoutCallback, void* clientData=0);
+ ///! Send a string to stderr. Stdout callbacks will not be invoced.
+ static void Stderr(const char* s, int length);
+
///! Return true if there was an error at any point.
static bool GetErrorOccuredFlag()
{
@@ -196,7 +199,8 @@ public:
* 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.
+ * into stdout. OUTPUT_NORMAL passes through the output to stdout/stderr as
+ * it was received.
*
* If timeout is specified, the command will be terminated after
* timeout expires. Timeout is specified in seconds.
@@ -214,7 +218,8 @@ public:
enum OutputOption
{
OUTPUT_NONE = 0,
- OUTPUT_MERGE
+ OUTPUT_MERGE,
+ OUTPUT_NORMAL
};
static bool RunSingleCommand(const char* command, std::string* output = 0,
int* retVal = 0, const char* dir = 0,