[Development] Enabling -Werror developer builds
Thiago Macieira
thiago.macieira at intel.com
Tue Aug 20 00:14:03 CEST 2013
Hello
Commit ebfd85a499a4382ace09d443b1f35cd6b1848af6 adds support for -Werror, but
it hasn't been acted on yet. The commit says:
This is enabled only for -developer-builds and only for certain
compiler-version combinations that are in a whitelist.
It also requires each library, plugin or tool to declare whether it is
supposedly clean of warnings. When most targets are clean, we can
consider inverting.
So, expanding:
1) -Werror is opt-in for regular builds (pass -warnings-are-errors to
configure), and opt-out for developer builds (pass -no-warnings-are-errors).
2) -Werror is enabled only for certain compiler versions. I'll update the
whitelist to have an upper range too. For example, right now it enables -
Werror for GCC 4.6 and above. I'm going to introduce an upper limit because we
don't know what new warnings our code triggers with newer versions of GCC.
That means we'll need to first clean up the warnings before expanding the
whitelist.
3) Each library, plugin or tool needs to declare it's clean by passing:
CONFIG += warning_clean
or possibly:
*-g++*:CONFIG += warning_clean
Right now, I've got most modules compiling with -Werror with GCC 4.7. I'd like
to start adding the CONFIG to enable the flag.
Objections?
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20130819/20411b77/attachment.sig>
More information about the Development
mailing list