From e6731578246b6e6959026d4a9da9971b097c83aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gr=C3=B6ber?= Date: Mon, 15 Feb 2021 04:07:23 +0100 Subject: Add configure flag to enable ASSERTs in all ways Running the test suite with asserts enabled is somewhat tricky at the moment as running it with a GHC compiled the DEBUG way has some hundred failures from the start. These seem to be unrelated to assertions though. So this provides a toggle to make it easier to debug failing assertions using the test suite. --- includes/Cmm.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'includes/Cmm.h') diff --git a/includes/Cmm.h b/includes/Cmm.h index b1b8680e99..9b17e9f400 100644 --- a/includes/Cmm.h +++ b/includes/Cmm.h @@ -211,7 +211,13 @@ Assertions and Debuggery -------------------------------------------------------------------------- */ -#if defined(DEBUG) +#if defined(DEBUG) || defined(USE_ASSERTS_ALL_WAYS) +#define ASSERTS_ENABLED 1 +#else +#undef ASSERTS_ENABLED +#endif + +#if ASSERTS_ENABLED #define ASSERT(predicate) \ if (predicate) { \ /*null*/; \ -- cgit v1.2.1