Disallow some keyword arguments to gnome.mkenums.

The install argument is allowed for CustomTargets, but we use
install_header as the setting now. Also, setting a generic template when
specifying the more specific source or header template shouldn't be
allowed.
pull/1064/head
Elliott Sales de Andrade 8 years ago committed by Jussi Pakkanen
parent 621219ccb0
commit 996f4d89f3
  1. 10
      mesonbuild/modules/gnome.py

@ -715,7 +715,7 @@ can not be used with the current version of glib-compiled-resources, due to
known_kwargs = ['comments', 'eprod', 'fhead', 'fprod', 'ftail',
'identifier_prefix', 'symbol_prefix', 'template',
'vhead', 'vprod', 'vtail']
known_custom_target_kwargs = ['install', 'install_dir', 'build_always',
known_custom_target_kwargs = ['install_dir', 'build_always',
'depends', 'depend_files']
c_template = h_template = None
install_header = False
@ -724,8 +724,16 @@ can not be used with the current version of glib-compiled-resources, due to
sources = [value] + sources
elif arg == 'c_template':
c_template = value
if 'template' in kwargs:
raise MesonException('Mkenums does not accept both '
'c_template and template keyword '
'arguments at the same time.')
elif arg == 'h_template':
h_template = value
if 'template' in kwargs:
raise MesonException('Mkenums does not accept both '
'h_template and template keyword '
'arguments at the same time.')
elif arg == 'install_header':
install_header = value
elif arg in known_kwargs:

Loading…
Cancel
Save