diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-06-14 15:42:53 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-06-14 15:42:53 (GMT) |
commit | a95a4b000db076d7a7c1dff163508b1922344339 (patch) | |
tree | bcb6f47e078359cca656cf44b021d337cff5e21d /Source/cmCTest.h | |
parent | 02f12a82be59f44b640ed86da39eaf469025a2be (diff) | |
download | CMake-a95a4b000db076d7a7c1dff163508b1922344339.zip CMake-a95a4b000db076d7a7c1dff163508b1922344339.tar.gz CMake-a95a4b000db076d7a7c1dff163508b1922344339.tar.bz2 |
ENH: Separate standard output and standard error for problematic commands
Diffstat (limited to 'Source/cmCTest.h')
-rw-r--r-- | Source/cmCTest.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/Source/cmCTest.h b/Source/cmCTest.h index bb5cf4c..e49bd0b 100644 --- a/Source/cmCTest.h +++ b/Source/cmCTest.h @@ -140,7 +140,31 @@ public: ///! Should we only show what we would do? bool GetShowOnly(); - + + /** + * Run a single executable command and put the stdout and stderr + * in output. + * + * If verbose is false, no user-viewable output from the program + * being run will be generated. + * + * If timeout is specified, the command will be terminated after + * timeout expires. Timeout is specified in seconds. + * + * Argument retVal should be a pointer to the location where the + * exit code will be stored. If the retVal is not specified and + * the program exits with a code other than 0, then the this + * function will return false. + * + * If the command has spaces in the path the caller MUST call + * cmSystemTools::ConvertToRunCommandPath on the command before passing + * it into this function or it will not work. The command must be correctly + * escaped for this to with spaces. + */ + bool RunCommand(const char* command, + std::string* stdOut, std::string* stdErr, + int* retVal = 0, const char* dir = 0, double timeout = 0.0); + //! Start CTest XML output file void StartXML(std::ostream& ostr); |