Make CATCH_BREAK_INTO_DEBUGGER be user-configurable

This commit is contained in:
khyperia
2020-01-27 15:43:27 +01:00
committed by Martin Hořeňovský
parent 481f54b357
commit 4a5bc0f39a
2 changed files with 19 additions and 4 deletions

View File

@@ -48,10 +48,12 @@ namespace Catch {
#define CATCH_TRAP() DebugBreak()
#endif
#ifdef CATCH_TRAP
#define CATCH_BREAK_INTO_DEBUGGER() []{ if( Catch::isDebuggerActive() ) { CATCH_TRAP(); } }()
#else
#define CATCH_BREAK_INTO_DEBUGGER() []{}()
#ifndef CATCH_BREAK_INTO_DEBUGGER
#ifdef CATCH_TRAP
#define CATCH_BREAK_INTO_DEBUGGER() []{ if( Catch::isDebuggerActive() ) { CATCH_TRAP(); } }()
#else
#define CATCH_BREAK_INTO_DEBUGGER() []{}()
#endif
#endif
#endif // TWOBLUECUBES_CATCH_DEBUGGER_H_INCLUDED