diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-08-04 02:32:15 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-08-04 02:32:15 (GMT) |
commit | 8a31793c89be483bcf6d44fff0785b894172e35a (patch) | |
tree | 18fac48dce25c738edb3d8e7a0a8f6d134963c7a /Source/cmSystemTools.h | |
parent | c7f1198a0062a24edf3166e5f4cfcdcbb8b556f7 (diff) | |
download | CMake-8a31793c89be483bcf6d44fff0785b894172e35a.zip CMake-8a31793c89be483bcf6d44fff0785b894172e35a.tar.gz CMake-8a31793c89be483bcf6d44fff0785b894172e35a.tar.bz2 |
ENH: Add back the kwsysProcess RunCommand, now is in parallel
Diffstat (limited to 'Source/cmSystemTools.h')
-rw-r--r-- | Source/cmSystemTools.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h index a25b9d9..7f26b25 100644 --- a/Source/cmSystemTools.h +++ b/Source/cmSystemTools.h @@ -162,6 +162,23 @@ public: static bool RunCommand(const char* command, std::string& output, 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. + * + * 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. + */ + static bool RunSingleCommand(const char* command, std::string* output = 0, + int* retVal = 0, const char* dir = 0, bool verbose = true, int timeout = 0); static void EnableMessages() { s_DisableMessages = false; } static void DisableMessages() { s_DisableMessages = true; } |