On Sun, Jul 02, 2017 at 03:21:51PM +0100, Sam Thursfield wrote:
> On Sun, Jul 2, 2017 at 1:27 PM, Sébastien Wilmet <swilmet gnome org> wrote:
> > Out of curiosity, let's look at other GNOME-related modules that use
> > gtk-doc. What is the name of the option that enables gtk-doc?
> > - pango: enable_docs
> > - gtk+: enable-documentation
> > - graphene: enable-gtk-doc
> > - atk: enable_docs
>
> We should indeed work to make these names consistent across GNOME
> modules. Having a page on the wiki where we list standard option names
> for Meson build systems would be a good start.
To make the names consistent, the best way is to write the name in only
one place, i.e. in meson itself or a meson function/macro. Not in each
individual modules.
Like the GTK_DOC_CHECK Autotools macro.
Currently, Meson modules cannot define options, but it's something that would be useful, and AFAIR there's an issue opened about it.
The same for compiler flags, with the Autotools there is the
AX_COMPILER_FLAGS macro. With meson it seems that the flags are listed
in each GNOME module.
On the other hand, having a common set of warnings is broken and it demonstrably does not work, as I've found after having to fix the various modules that were moved to AX_COMPILER_FLAGS.
There is a subset of warnings you want for C - and those should go in Meson's warning_level option. Differently projects have very different requirements: there is no "one size fits all" or alias for an ever changing set of warnings - otherwise we'd all run with -Wextra and -Werror.
Ciao,
Emmanuele.