diff options
author | David Cole <david.cole@kitware.com> | 2012-02-22 21:21:48 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2012-02-22 21:21:48 (GMT) |
commit | bada88e8e45640afa5ef063aeab180fd6f1cfee4 (patch) | |
tree | 65e489a11a6014b756ab8d8b86df584ac3eb2bcc /Source/cmSystemTools.h | |
parent | 54bd175eea66704a879fc72278cdbb49efdd801c (diff) | |
parent | 8233636dbe531ccf36510242e7c997dfa6529bde (diff) | |
download | CMake-bada88e8e45640afa5ef063aeab180fd6f1cfee4.zip CMake-bada88e8e45640afa5ef063aeab180fd6f1cfee4.tar.gz CMake-bada88e8e45640afa5ef063aeab180fd6f1cfee4.tar.bz2 |
Merge branch 'target-include-directories' into ninja-generator
Diffstat (limited to 'Source/cmSystemTools.h')
-rw-r--r-- | Source/cmSystemTools.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h index 88ae1c0..5f21de2 100644 --- a/Source/cmSystemTools.h +++ b/Source/cmSystemTools.h @@ -83,6 +83,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() { @@ -101,7 +106,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 @@ -472,8 +477,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; }; |