Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Štetiar <ynezz@true.cz>2019-11-20 20:02:39 +0300
committerPetr Štetiar <ynezz@true.cz>2019-11-24 15:26:58 +0300
commit8baeeea1f52d7081aac81d80fdb55b8749d9392e (patch)
tree7b0322e740d0b793d366ab87cafde762d8fa5919 /assert.h
parentb0a5cd8a28bf1d1883317ceac6cb8967d840d6ae (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.h9
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