build: disable assertions in release builds
refs #2135
Change-Id: I544725f2274d0f15b55a0c8de3acb2e801a2c993
diff --git a/wscript b/wscript
index 3d806d2..2c62c5e 100644
--- a/wscript
+++ b/wscript
@@ -89,6 +89,12 @@
conf.write_config_header('src/ndn-cxx-config.hpp', define_prefix='NDN_CXX_')
+ # disable assertions in release builds
+ # This must appear after write_config_header, because otherwise all projects
+ # using a ndn-cxx release build would be compiled without assertions.
+ if not conf.options.debug:
+ conf.define('NDEBUG', 1)
+
def build(bld):
version(bld)