diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2002-09-18 18:18:43 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2002-09-18 18:18:43 (GMT) |
commit | 6769e8447291ab73cbf904a9470e4a7094c34e4d (patch) | |
tree | 0139f69c88217afb66567f20495b272f0562d1df /Source/cmSystemTools.cxx | |
parent | eab24670e3e2a8b2a7469ba418e183c363ff27d1 (diff) | |
download | CMake-6769e8447291ab73cbf904a9470e4a7094c34e4d.zip CMake-6769e8447291ab73cbf904a9470e4a7094c34e4d.tar.gz CMake-6769e8447291ab73cbf904a9470e4a7094c34e4d.tar.bz2 |
Improve message handler to include client data.
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r-- | Source/cmSystemTools.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 6139292..1ffd4f7 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -74,7 +74,8 @@ bool cmSystemTools::s_DisableRunCommandOutput = false; bool cmSystemTools::s_ErrorOccured = false; bool cmSystemTools::s_DisableMessages = false; -void (*cmSystemTools::s_ErrorCallback)(const char*, const char*, bool&); +void (*cmSystemTools::s_ErrorCallback)(const char*, const char*, bool&, void*); +void* cmSystemTools::s_ErrorCallbackClientData = 0; // adds the elements of the env variable path to the arg passed in void cmSystemTools::GetPath(std::vector<std::string>& path) @@ -984,9 +985,10 @@ void cmSystemTools::Error(const char* m1, const char* m2, } -void cmSystemTools::SetErrorCallback(ErrorCallback f) +void cmSystemTools::SetErrorCallback(ErrorCallback f, void* clientData) { s_ErrorCallback = f; + s_ErrorCallbackClientData = clientData; } void cmSystemTools::Message(const char* m1, const char *title) @@ -997,7 +999,7 @@ void cmSystemTools::Message(const char* m1, const char *title) } if(s_ErrorCallback) { - (*s_ErrorCallback)(m1, title, s_DisableMessages); + (*s_ErrorCallback)(m1, title, s_DisableMessages, s_ErrorCallbackClientData); return; } else |