Meson werror option

Peter Bloomfield <[email protected]> Wed, 13 Nov 2019 22:02:30 -0500
Newsgroups gmane.comp.gnome.apps.balsa
Message-ID <[email protected]>
Hi All Testers!

Balsa has always been configured so that if it is built from a development source tree, currently a git tree from GitLab, the "-Werror" flag is passed to the compiler. That means that compiler warnings are escalated to errors and the build fails, which is a great incentive for fixing warnings ;-)

That's currently set up for both the autotools build and for Meson. But Meson has a "--werror" option which has the same effect; "-Werror" is passed to the compiler, at least if it's gcc or similar; options like that are preferred over explicit compiler flags (for portability, I guess). But there doesn't seem to be any way to set them conditionally, like we always have with "-Werror". So we could drop the explicit "-Werror" flag and just pass "--werror" to Meson, for instance as "meson configure --werror" in the build directory. But that puts the onus on the tester to ensure that the flag gets set.

For myself, I keep a file meson-config with all the options that I use, and make a build directory using

meson `cat path/to/meson-config` path/to/build-dir

so, to test dropping the explicit "-Werror" flag, I just had to add "--werror" to meson-config and it all works. But we all have different work-flows, and dropping it might be more of a problem for some.

Comments?

Peter

_______________________________________________
balsa-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/balsa-list
signature.asc (application/pgp-signature, 195 B)
-----BEGIN PGP SIGNATURE-----

iF0EABECAB0WIQS030wPRfNNA5alz3MfX9S1uSp09QUCXczDxgAKCRAfX9S1uSp0
9dheAJ4gW9yfOGK2iCub7nS7SUMffN0ETgCcClQzs+MnkeShEhSUbyrVkZHcpY8=
=44uu
-----END PGP SIGNATURE-----