diff options
| author | Petr Štetiar | 2019-11-20 17:02:39 +0000 |
|---|---|---|
| committer | Petr Štetiar | 2019-11-24 12:26:58 +0000 |
| commit | 8baeeea1f52d7081aac81d80fdb55b8749d9392e (patch) | |
| tree | 7b0322e740d0b793d366ab87cafde762d8fa5919 | |
| parent | b0a5cd8a28bf1d1883317ceac6cb8967d840d6ae (diff) | |
| download | libubox-8baeeea1f52d7081aac81d80fdb55b8749d9392e.tar.gz | |
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>
| -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 |