@@ -439,6 +439,10 @@ if test "x$enable_werror" = "xyes"; then
439
439
[ AC_LANG_SOURCE ( [ [ struct A { virtual void f(); }; struct B : A { void f() final; };] ] ) ] )
440
440
AX_CHECK_COMPILE_FLAG ( [ -Werror=unreachable-code-loop-increment] ,[ ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=unreachable-code-loop-increment"] ,,[ [ $CXXFLAG_WERROR] ] )
441
441
AX_CHECK_COMPILE_FLAG ( [ -Werror=mismatched-tags] , [ ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=mismatched-tags"] , [ ] , [ $CXXFLAG_WERROR] )
442
+
443
+ if test x$suppress_external_warnings != xno ; then
444
+ AX_CHECK_COMPILE_FLAG ( [ -Werror=documentation] ,[ ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=documentation"] ,,[ [ $CXXFLAG_WERROR] ] )
445
+ fi
442
446
fi
443
447
444
448
if test "x$CXXFLAGS_overridden" = "xno"; then
@@ -466,6 +470,10 @@ if test "x$CXXFLAGS_overridden" = "xno"; then
466
470
[ AC_LANG_SOURCE ( [ [ struct A { virtual void f(); }; struct B : A { void f() final; };] ] ) ] )
467
471
AX_CHECK_COMPILE_FLAG ( [ -Wunreachable-code-loop-increment] ,[ WARN_CXXFLAGS="$WARN_CXXFLAGS -Wunreachable-code-loop-increment"] ,,[ [ $CXXFLAG_WERROR] ] )
468
472
473
+ if test x$suppress_external_warnings != xno ; then
474
+ AX_CHECK_COMPILE_FLAG ( [ -Wdocumentation] ,[ WARN_CXXFLAGS="$WARN_CXXFLAGS -Wdocumentation"] ,,[ [ $CXXFLAG_WERROR] ] )
475
+ fi
476
+
469
477
dnl Some compilers (gcc) ignore unknown -Wno-* options, but warn about all
470
478
dnl unknown options if any other warning is produced. Test the -Wfoo case, and
471
479
dnl set the -Wno-foo case if it works.
0 commit comments