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.