From 06e18e0b53ed34933ecd7f3976a508be72f687aa Mon Sep 17 00:00:00 2001 From: fanquake Date: Sun, 20 Feb 2022 09:29:09 +0000 Subject: [PATCH] build: use BOOST_MULTI_INDEX_ENABLE_SAFE_MODE when debugging Use of this macro enables precondition checks for iterators and functions of the library. It's use is recommended in debug builds. See: https://www.boost.org/doc/libs/1_78_0/libs/multi_index/doc/tutorial/debug.html. --- configure.ac | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configure.ac b/configure.ac index 6dcc5183ea9..70407bc12d5 100644 --- a/configure.ac +++ b/configure.ac @@ -1455,6 +1455,10 @@ if test "$use_boost" = "yes"; then dnl we don't use multi_index serialization BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION" + if test "$enable_debug" = "yes" || test "$enable_fuzz" = "yes"; then + BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE" + fi + if test "$suppress_external_warnings" != "no"; then BOOST_CPPFLAGS=SUPPRESS_WARNINGS($BOOST_CPPFLAGS) fi