diff options
author | Patrick Griffis <tingping@tingping.se> | 2017-07-19 22:51:06 -0400 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-07-20 12:27:38 +0300 |
commit | 9683082c4cb4232610e088faaafe0f392484583b (patch) | |
tree | 777f32d8101d66eb07fb96166376da907d458ad7 | |
parent | 6f4e5e96d87b4f28b0f2fc92edb854d1fd81cfdc (diff) | |
download | meson-9683082c4cb4232610e088faaafe0f392484583b.zip meson-9683082c4cb4232610e088faaafe0f392484583b.tar.gz meson-9683082c4cb4232610e088faaafe0f392484583b.tar.bz2 |
gnome.genmarshal(): Include generated header in generated source
This silences any strict-prototype warnings if enabled.
-rw-r--r-- | mesonbuild/modules/gnome.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index 3b4d1ce..dd4ca50 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -1005,7 +1005,11 @@ class GnomeModule(ExtensionModule): if arg in kwargs: custom_kwargs[arg] = kwargs[arg] + header_file = output + '.h' custom_kwargs['command'] = cmd + ['--body', '@INPUT@'] + if mesonlib.version_compare(self._get_native_glib_version(state), '>= 2.53.4'): + # Silence any warnings about missing prototypes + custom_kwargs['command'] += ['--include-header', header_file] custom_kwargs['output'] = output + '.c' body = build.CustomTarget(output + '_c', state.subdir, custom_kwargs) @@ -1013,7 +1017,7 @@ class GnomeModule(ExtensionModule): if install_dir is not None: custom_kwargs['install_dir'] = install_dir custom_kwargs['command'] = cmd + ['--header', '@INPUT@'] - custom_kwargs['output'] = output + '.h' + custom_kwargs['output'] = header_file header = build.CustomTarget(output + '_h', state.subdir, custom_kwargs) rv = [body, header] |