configure: enable -Werror by default when available
Turn this on when building under Travis to increase coverage.master
parent
75c38f6b32
commit
b12f217681
|
@ -259,6 +259,13 @@ if test "$mingw_cv_win32_host" = yes; then
|
|||
AC_DEFINE([BGDWIN32], [], [Define is you are building for Win32 API])
|
||||
fi
|
||||
|
||||
dnl Enable -Werror if possible. Do it after all other tests.
|
||||
AC_ARG_ENABLE([werror], [AS_HELP_STRING([--enable-werror], [treat compile warnings as errors])])
|
||||
if test "$enable_werror" = "yes" || test "$GCC" = "yes" -a "$enable_werror" != "no"; then
|
||||
CFLAGS="-Werror $CFLAGS"
|
||||
CXXFLAGS="-Werror $CXXFLAGS"
|
||||
fi
|
||||
|
||||
dnl report configuration
|
||||
AC_MSG_RESULT([
|
||||
** Configuration summary for $PACKAGE $VERSION:
|
||||
|
|
|
@ -12,6 +12,7 @@ build_autotools() {
|
|||
v --fold="configure" ./configure \
|
||||
--prefix=/usr/local \
|
||||
--libdir=/usr/local/lib \
|
||||
--enable-werror \
|
||||
--with-fontconfig \
|
||||
--with-freetype \
|
||||
--with-jpeg \
|
||||
|
|
Loading…
Reference in New Issue