summaryrefslogtreecommitdiffstats
path: root/Source/cmake.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmake.h')
-rw-r--r--Source/cmake.h15
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;