diff options
author | Petr Štetiar <ynezz@true.cz> | 2019-11-20 20:02:39 +0300 |
---|---|---|
committer | Petr Štetiar <ynezz@true.cz> | 2019-11-24 15:26:58 +0300 |
commit | 8baeeea1f52d7081aac81d80fdb55b8749d9392e (patch) | |
tree | 7b0322e740d0b793d366ab87cafde762d8fa5919 /assert.h | |
parent | b0a5cd8a28bf1d1883317ceac6cb8967d840d6ae (diff) |
add assert.h component
In order to allow seamless assert() usage in release builds without the
need for fiddling with CMake C flags as CMake adds -DNDEBUG switch in
release builds which disable assert().
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Diffstat (limited to 'assert.h')
-rw-r--r-- | assert.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/assert.h b/assert.h new file mode 100644 index 0000000..84f5471 --- /dev/null +++ b/assert.h @@ -0,0 +1,9 @@ +#pragma once + +#ifdef NDEBUG +#undef NDEBUG +#include <assert.h> +#define NDEBUG +#else +#include <assert.h> +#endif |