diff options
author | David Cole <david.cole@kitware.com> | 2012-02-14 21:14:35 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2012-02-14 21:14:35 (GMT) |
commit | e65f39a59ed45ceb3f0be7f69d26c64677d599cd (patch) | |
tree | ce5104af38d26486b566b9ef411ca239c8cebbd6 /Source/cmSystemTools.cxx | |
parent | 5b016a23d0235a04b463533c1136dfdbc4cc14b4 (diff) | |
parent | 131eed660716a2a8b52a6956f8e8a136425c404e (diff) | |
download | CMake-e65f39a59ed45ceb3f0be7f69d26c64677d599cd.zip CMake-e65f39a59ed45ceb3f0be7f69d26c64677d599cd.tar.gz CMake-e65f39a59ed45ceb3f0be7f69d26c64677d599cd.tar.bz2 |
Merge topic 'interrupt-bug-12649'
131eed6 cmake-gui: Improve interrupt granularity to fix bug 12649.
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r-- | Source/cmSystemTools.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 02060ca..15e689b 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -131,6 +131,8 @@ void (*cmSystemTools::s_ErrorCallback)(const char*, const char*, void (*cmSystemTools::s_StdoutCallback)(const char*, int len, void*); void* cmSystemTools::s_ErrorCallbackClientData = 0; void* cmSystemTools::s_StdoutCallbackClientData = 0; +bool (*cmSystemTools::s_InterruptCallback)(void*); +void* cmSystemTools::s_InterruptCallbackClientData = 0; // replace replace with with as many times as it shows up in source. // write the result into source. @@ -220,6 +222,20 @@ void cmSystemTools::Error(const char* m1, const char* m2, cmSystemTools::Message(message.c_str(),"Error"); } +void cmSystemTools::SetInterruptCallback(InterruptCallback f, void* clientData) +{ + s_InterruptCallback = f; + s_InterruptCallbackClientData = clientData; +} + +bool cmSystemTools::GetInterruptFlag() +{ + if(s_InterruptCallback) + { + return (*s_InterruptCallback)(s_InterruptCallbackClientData); + } + return false; +} void cmSystemTools::SetErrorCallback(ErrorCallback f, void* clientData) { |