[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: warnings and -Werror

From: Simon Josefsson
Subject: Re: warnings and -Werror
Date: Mon, 14 Mar 2011 21:17:26 +0100

Reuben Thomas <address@hidden> writes:

> The documentation for the warnings module says:
> "It allows to use ‘-Werror’ at ‘make distcheck’ time"
> but gives no clue as to how this is done; nor is -Werror mentioned in
> warnings.m4. Could we have a hint, please? (The documentation shows
> how to make the set of warnings chosen only apply to certain
> directories, but not how to make them apply to different targets,

In libidn I have this in my configure.ac:

                  [turn on lots of GCC warnings (for developers)])],
  [case $enableval in
     yes|no) ;;
     *)      AC_MSG_ERROR([bad value $enableval for gcc-warnings option]) ;;

if test "$gl_gcc_warnings" = yes; then
  gl_WARN_ADD([-Werror], [WERROR_CFLAGS])

And in the directories where I want -Werror I add $(WERROR_CFLAGS) to
the AM_CPPFLAGS directive.

It requires a bit more manual work for package maintainers, so it
doesn't feel entirely clean, which is probably the reason it isn't
documented better.

Do you think this is useful?  Maybe warnings.m4 should unconditionally
check for -Werror since it actually is a standard gcc parameter.  Then
all projects doesn't have to hard code that test themselves.

Alternatively, we could just document the current way.  I'm not sure.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]