diff options
author | Ken Martin <ken.martin@kitware.com> | 2002-09-26 19:14:20 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2002-09-26 19:14:20 (GMT) |
commit | c751d2ebff5b95b0f00c09ef6203d70f323c8144 (patch) | |
tree | d52b04bd774d9d6d4ba27ec633249f52c7253f52 /Source/cmake.h | |
parent | 85896b3460f3e1276dec6ad67d63df26e65d16e2 (diff) | |
download | CMake-c751d2ebff5b95b0f00c09ef6203d70f323c8144.zip CMake-c751d2ebff5b95b0f00c09ef6203d70f323c8144.tar.gz CMake-c751d2ebff5b95b0f00c09ef6203d70f323c8144.tar.bz2 |
added progress
Diffstat (limited to 'Source/cmake.h')
-rw-r--r-- | Source/cmake.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/cmake.h b/Source/cmake.h index 3a9c165..09daa14 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -211,6 +211,19 @@ class cmake ///! Parse command line arguments that might set cache values void SetCacheArgs(const std::vector<std::string>&); + typedef void (*ProgressCallback)(const char*msg, float progress, void *); + /** + * Set the function used by GUI's to receive progress updates + * Function gets passed: message as a const char*, a progress + * amount ranging from 0 to 1.0 and client data. The progress + * number provided may be negative in cases where a message is + * to be displayed without any progress percentage. + */ + void SetProgressCallback(ProgressCallback f, void* clientData=0); + + ///! this is called by generators to update the progress + void UpdateProgress(const char *msg, float prog); + protected: typedef std::map<cmStdString, cmCommand*> RegisteredCommandsMap; RegisteredCommandsMap m_Commands; @@ -235,6 +248,8 @@ protected: int AddCMakePaths(const char *arg0); private: + ProgressCallback m_ProgressCallback; + void* m_ProgressCallbackClientData; bool m_Verbose; bool m_Local; bool m_InTryCompile; |