diff options
-rw-r--r-- | docs/markdown/Gnome-module.md | 1 | ||||
-rw-r--r-- | mesonbuild/modules/gnome.py | 9 |
2 files changed, 8 insertions, 2 deletions
diff --git a/docs/markdown/Gnome-module.md b/docs/markdown/Gnome-module.md index a02cc42..634fe79 100644 --- a/docs/markdown/Gnome-module.md +++ b/docs/markdown/Gnome-module.md @@ -235,6 +235,7 @@ one XML file. * `interface_prefix`: prefix for the interface * `namespace`: namespace of the interface * `extra_args`: (*Added 0.47.0*) additional command line arguments to pass +* `autocleanup`: *(Added 0.47.0)* if set generates autocleanup code. Can be one of `none`, `objects` or `all` * `object_manager`: *(Added 0.40.0)* if true generates object manager code * `annotations`: *(Added 0.43.0)* list of lists of 3 strings for the annotation for `'ELEMENT', 'KEY', 'VALUE'` * `docbook`: *(Added 0.43.0)* prefix to generate `'PREFIX'-NAME.xml` docbooks diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index 08298e8..e1702c0 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -881,8 +881,8 @@ This will become a hard error in the future.''') @FeatureNewKwargs('build target', '0.46.0', ['install_header', 'install_dir', 'sources']) @FeatureNewKwargs('build target', '0.40.0', ['build_by_default']) - @FeatureNewKwargs('build target', '0.47.0', ['extra_args']) - @permittedKwargs({'interface_prefix', 'namespace', 'extra_args', 'object_manager', 'build_by_default', + @FeatureNewKwargs('build target', '0.47.0', ['extra_args', 'autocleanup']) + @permittedKwargs({'interface_prefix', 'namespace', 'extra_args', 'autocleanup', 'object_manager', 'build_by_default', 'annotations', 'docbook', 'install_header', 'install_dir', 'sources'}) def gdbus_codegen(self, state, args, kwargs): if len(args) not in (1, 2): @@ -893,6 +893,11 @@ This will become a hard error in the future.''') cmd = [self.interpreter.find_program_impl('gdbus-codegen')] extra_args = mesonlib.stringlistify(kwargs.pop('extra_args', [])) cmd += extra_args + autocleanup = kwargs.pop('autocleanup', 'all') + if autocleanup not in ['none', 'objects', 'all']: + raise MesonException( + 'Gdbus_codegen does not support %s as an autocleanup value.' % (autocleanup, )) + cmd += ['--c-generate-autocleanup', autocleanup] if 'interface_prefix' in kwargs: cmd += ['--interface-prefix', kwargs.pop('interface_prefix')] if 'namespace' in kwargs: |