Skip to content

Commit f15e1db

Browse files
committed
fix: make std::unary_function suppression flag no longer contingent on --enable-suppress-external-warnings
This is in line with how it's done in 880d4aa upstream. This wasn't noticed with CI as we build with `--enable-suppress-external-warnings` by default.
1 parent 5db84e2 commit f15e1db

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

configure.ac

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1458,6 +1458,12 @@ AX_BOOST_BASE([1.64.0],[],[AC_MSG_ERROR([Boost is not available!])])
14581458
if test x$want_boost = xno; then
14591459
AC_MSG_ERROR([[only libdashconsensus can be built without boost]])
14601460
fi
1461+
1462+
dnl Prevent use of std::unary_function, which was removed in C++17,
1463+
dnl and will generate warnings with newer compilers.
1464+
dnl See: https://github.com/boostorg/container_hash/issues/22.
1465+
BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_NO_CXX98_FUNCTION_BASE"
1466+
14611467
AX_BOOST_FILESYSTEM
14621468

14631469
dnl Opt-in to Boost Process
@@ -1471,11 +1477,6 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <boost/process.hpp>]],
14711477
fi
14721478

14731479
if test x$suppress_external_warnings != xno; then
1474-
dnl Prevent use of std::unary_function, which was removed in C++17,
1475-
dnl and will generate warnings with newer compilers.
1476-
dnl See: https://github.com/boostorg/container_hash/issues/22.
1477-
BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_NO_CXX98_FUNCTION_BASE"
1478-
14791480
BOOST_CPPFLAGS=SUPPRESS_WARNINGS($BOOST_CPPFLAGS)
14801481
fi
14811482

0 commit comments

Comments
 (0)