Skip to content

Commit

Permalink
build: Add assert.h override (#1202)
Browse files Browse the repository at this point in the history
I noticed in a few cases, if `assert.h` was not included through
`cassert`, `ACTS_FORCE_ASSERTIONS` would not do it's job because `assert` would then already be defined.
This commit thus enables a couple of additional assertions.
  • Loading branch information
paulgessinger committed Mar 24, 2022
1 parent 7c5a232 commit 0926824
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cmake/assert_include/assert.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#if defined(NDEBUG)
#define _HAD_NDEBUG
#undef NDEBUG
#endif
#include_next <assert.h>
#if defined(_HAD_NDEBUG)
#undef _HAD_NDEBUG
#define NDEBUG
#endif

0 comments on commit 0926824

Please sign in to comment.