summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.h
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2012-02-14 21:14:35 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2012-02-14 21:14:35 (GMT)
commite65f39a59ed45ceb3f0be7f69d26c64677d599cd (patch)
treece5104af38d26486b566b9ef411ca239c8cebbd6 /Source/cmSystemTools.h
parent5b016a23d0235a04b463533c1136dfdbc4cc14b4 (diff)
parent131eed660716a2a8b52a6956f8e8a136425c404e (diff)
downloadCMake-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.h')
-rw-r--r--Source/cmSystemTools.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h
index 2137340..7afc701 100644
--- a/Source/cmSystemTools.h
+++ b/Source/cmSystemTools.h
@@ -78,6 +78,11 @@ public:
///! Send a string to stderr. Stdout callbacks will not be invoced.
static void Stderr(const char* s, int length);
+
+ typedef bool (*InterruptCallback)(void*);
+ static void SetInterruptCallback(InterruptCallback f, void* clientData=0);
+ static bool GetInterruptFlag();
+
///! Return true if there was an error at any point.
static bool GetErrorOccuredFlag()
{
@@ -96,7 +101,7 @@ public:
///! Return true if there was an error at any point.
static bool GetFatalErrorOccured()
{
- return cmSystemTools::s_FatalErrorOccured;
+ return cmSystemTools::s_FatalErrorOccured || GetInterruptFlag();
}
///! Set the error occured flag and fatal error back to false
@@ -467,8 +472,10 @@ private:
static bool s_DisableRunCommandOutput;
static ErrorCallback s_ErrorCallback;
static StdoutCallback s_StdoutCallback;
+ static InterruptCallback s_InterruptCallback;
static void* s_ErrorCallbackClientData;
static void* s_StdoutCallbackClientData;
+ static void* s_InterruptCallbackClientData;
static std::string s_Windows9xComspecSubstitute;
};