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.
This commit is contained in:
fanquake 2022-02-20 09:29:09 +00:00
parent fdb82a30be
commit 06e18e0b53
No known key found for this signature in database
GPG key ID: 2EEB9F5CC09526C1

View file

@ -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