Skip to content
Snippets Groups Projects
Commit 2fc7ea47 authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Build: Added configure option --enable-werror.

The configure option --enable-werror now adds -Werror
to the set of WARN flags.
parent 4f56a9aa
No related branches found
No related tags found
No related merge requests found
......@@ -1676,6 +1676,9 @@ OPTIMIZE="${OPTFLAGS-}"
AC_ARG_ENABLE(pedantic, MY_DESCR([--enable-pedantic],
[enable -pedantic compilation]))
AC_ARG_ENABLE(werror, MY_DESCR([--enable-werror],
[enable -Werror compilation]))
if test "$cflags_is_set" = "no"; then
if test "x$with_cdebug" = "xno" ; then
CFLAGS=`echo " $CFLAGS " | sed -e 's@ -g @ @g'`
......@@ -1687,6 +1690,9 @@ if test "$cflags_is_set" = "no"; then
AC_SYS_COMPILER_FLAG(-pedantic,pedantic,WARN)
fi
if test "x$enable_werror" = "xyes"; then
AC_SYS_COMPILER_FLAG(-Werror,error,WARN)
fi
if test "x${GCC-}" = xyes ; then
# Do not use -Wall, since that produces a lot of warnings that are not
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment