Fixes for cygwin

This commit is contained in:
philsquared 2018-02-01 16:14:12 +00:00
parent 1ab6be30a2
commit 5713381d06
2 changed files with 6 additions and 1 deletions

View File

@ -40,7 +40,10 @@ namespace Catch {
#ifdef CATCH_TRAP #ifdef CATCH_TRAP
#define CATCH_BREAK_INTO_DEBUGGER() if( Catch::isDebuggerActive() ) { CATCH_TRAP(); } #define CATCH_BREAK_INTO_DEBUGGER() if( Catch::isDebuggerActive() ) { CATCH_TRAP(); }
#else #else
#define CATCH_BREAK_INTO_DEBUGGER() (void)0, 0 namespace Catch {
inline void doNothing() {}
}
#define CATCH_BREAK_INTO_DEBUGGER() Catch::doNothing()
#endif #endif
#endif // TWOBLUECUBES_CATCH_DEBUGGER_H_INCLUDED #endif // TWOBLUECUBES_CATCH_DEBUGGER_H_INCLUDED

View File

@ -17,12 +17,14 @@
# pragma GCC diagnostic ignored "-Wmissing-field-initializers" # pragma GCC diagnostic ignored "-Wmissing-field-initializers"
#endif #endif
#if (defined(CATCH_PLATFORM_WINDOWS) && defined(CATCH_CONFIG_WINDOWS_SEH)) || defined(CATCH_CONFIG_POSIX_SIGNALS)
namespace { namespace {
// Report the error condition // Report the error condition
void reportFatal( char const * const message ) { void reportFatal( char const * const message ) {
Catch::getCurrentContext().getResultCapture()->handleFatalErrorCondition( message ); Catch::getCurrentContext().getResultCapture()->handleFatalErrorCondition( message );
} }
} }
#endif
#if defined ( CATCH_PLATFORM_WINDOWS ) ///////////////////////////////////////// #if defined ( CATCH_PLATFORM_WINDOWS ) /////////////////////////////////////////