mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-09 08:18:03 +02:00
build: allow --set-more-warnings=no|yes|error
For the GNOME autobuilders, we want compiler warnings, but don't want -Werror. For developer compatibility, the default value is "error". https://bugzilla.gnome.org/show_bug.cgi?id=668974
This commit is contained in:
parent
c721477d11
commit
e4f51d1968
1 changed files with 5 additions and 3 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
AC_DEFUN([NM_COMPILER_WARNINGS],
|
AC_DEFUN([NM_COMPILER_WARNINGS],
|
||||||
[AC_ARG_ENABLE(more-warnings,
|
[AC_ARG_ENABLE(more-warnings,
|
||||||
AS_HELP_STRING([--enable-more-warnings], [Maximum compiler warnings]),
|
AS_HELP_STRING([--enable-more-warnings], [Possible values: no/yes/error]),
|
||||||
set_more_warnings="$enableval",set_more_warnings=yes)
|
set_more_warnings="$enableval",set_more_warnings=error)
|
||||||
AC_MSG_CHECKING(for more warnings)
|
AC_MSG_CHECKING(for more warnings)
|
||||||
if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
|
if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
|
|
@ -26,7 +26,9 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
|
||||||
unset SAVE_CFLAGS
|
unset SAVE_CFLAGS
|
||||||
done
|
done
|
||||||
unset option
|
unset option
|
||||||
CFLAGS="$CFLAGS -Werror"
|
if test "x$set_more_warnings" = xerror; then
|
||||||
|
CFLAGS="$CFLAGS -Werror"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue