mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-21 14:34:49 +01:00
build: enable -Wdocumentation if suppressing external warnings
Co-authored-by: Ben Woosley <ben.woosley@gmail.com>
This commit is contained in:
parent
3b0078f958
commit
a4e970adb6
1 changed files with 8 additions and 0 deletions
|
@ -439,6 +439,10 @@ if test "x$enable_werror" = "xyes"; then
|
|||
[AC_LANG_SOURCE([[struct A { virtual void f(); }; struct B : A { void f() final; };]])])
|
||||
AX_CHECK_COMPILE_FLAG([-Werror=unreachable-code-loop-increment],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=unreachable-code-loop-increment"],,[[$CXXFLAG_WERROR]])
|
||||
AX_CHECK_COMPILE_FLAG([-Werror=mismatched-tags], [ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=mismatched-tags"], [], [$CXXFLAG_WERROR])
|
||||
|
||||
if test x$suppress_external_warnings != xno ; then
|
||||
AX_CHECK_COMPILE_FLAG([-Werror=documentation],[ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=documentation"],,[[$CXXFLAG_WERROR]])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$CXXFLAGS_overridden" = "xno"; then
|
||||
|
@ -466,6 +470,10 @@ if test "x$CXXFLAGS_overridden" = "xno"; then
|
|||
[AC_LANG_SOURCE([[struct A { virtual void f(); }; struct B : A { void f() final; };]])])
|
||||
AX_CHECK_COMPILE_FLAG([-Wunreachable-code-loop-increment],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wunreachable-code-loop-increment"],,[[$CXXFLAG_WERROR]])
|
||||
|
||||
if test x$suppress_external_warnings != xno ; then
|
||||
AX_CHECK_COMPILE_FLAG([-Wdocumentation],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wdocumentation"],,[[$CXXFLAG_WERROR]])
|
||||
fi
|
||||
|
||||
dnl Some compilers (gcc) ignore unknown -Wno-* options, but warn about all
|
||||
dnl unknown options if any other warning is produced. Test the -Wfoo case, and
|
||||
dnl set the -Wno-foo case if it works.
|
||||
|
|
Loading…
Add table
Reference in a new issue