From 8baeeea1f52d7081aac81d80fdb55b8749d9392e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Petr=20=C5=A0tetiar?= Date: Wed, 20 Nov 2019 18:02:39 +0100 Subject: [PATCH] add assert.h component MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- assert.h | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 assert.h 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 +#define NDEBUG +#else +#include +#endif -- 2.25.1