<div dir="auto">You may need #include_next, to avoid recursion.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Nov 20, 2019, 15:45 Petr Štetiar <<a href="mailto:ynezz@true.cz">ynezz@true.cz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In order to allow seamless assert() usage in release builds without the<br>
need for fiddling with CMake C flags as CMake adds -DNDEBUG switch in<br>
release builds which disable assert().<br>
<br>
Signed-off-by: Petr Štetiar <<a href="mailto:ynezz@true.cz" target="_blank" rel="noreferrer">ynezz@true.cz</a>><br>
---<br>
 assert.h | 9 +++++++++<br>
 1 file changed, 9 insertions(+)<br>
 create mode 100644 assert.h<br>
<br>
diff --git a/assert.h b/assert.h<br>
new file mode 100644<br>
index 000000000000..84f54718366a<br>
--- /dev/null<br>
+++ b/assert.h<br>
@@ -0,0 +1,9 @@<br>
+#pragma once<br>
+<br>
+#ifdef NDEBUG<br>
+#undef NDEBUG<br>
+#include <assert.h><br>
+#define NDEBUG<br>
+#else<br>
+#include <assert.h><br>
+#endif<br>
<br>
_______________________________________________<br>
openwrt-devel mailing list<br>
<a href="mailto:openwrt-devel@lists.openwrt.org" target="_blank" rel="noreferrer">openwrt-devel@lists.openwrt.org</a><br>
<a href="https://lists.openwrt.org/mailman/listinfo/openwrt-devel" rel="noreferrer noreferrer" target="_blank">https://lists.openwrt.org/mailman/listinfo/openwrt-devel</a><br>
</blockquote></div>