automake
[Top][All Lists]
Advanced

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

Re: How to build source code while treating all warnings as errors with


From: Robert J. Hansen
Subject: Re: How to build source code while treating all warnings as errors with automake...
Date: Mon, 18 Feb 2008 12:00:29 -0600
User-agent: Thunderbird 2.0.0.9 (Windows/20071031)

jasond wrote:
Recently, I converted the project over to using Autotools and am
wondering if there is a portable way to instruct automake to generate
Makefiles that build code while treating all encountered warnings as
errors?

Probably so, and I'm sure Ralf will know what it is.  However, this is
usually not a very good idea.  You have no idea what compiler someone's
going to be using or what warnings it will throw.  For instance, passing
-Wall, -Wextra or -ansi to Solaris CC will give a warning.  E.g.,

CC: Warning: Option -Wall passed to ld, if ld is invoked, ignored
    otherwise
CC: Warning: Option -Wextra passed to ld, if ld is invoked, ignored
    otherwise
CC: Warning: Option -ansi passed to ld, if ld is invoked, ignored
    otherwise

... So by enforcing strict checking and flagging errors on warnings, you
are making sure that your code cannot compile out-of-the-box on Solaris.




reply via email to

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