Add 0.40.0 features

pull/3486/head
Salamandar 7 years ago
parent a1a53e8de1
commit fa6550b277
  1. 5
      mesonbuild/build.py
  2. 5
      mesonbuild/interpreter.py
  3. 3
      mesonbuild/modules/gnome.py
  4. 3
      mesonbuild/modules/qt.py

@ -25,6 +25,7 @@ from .mesonlib import typeslistify, stringlistify, classify_unity_sources
from .mesonlib import get_filenames_templates_dict, substitute_values
from .mesonlib import for_windows, for_darwin, for_cygwin, for_android, has_path_sep
from .compilers import is_object, clike_langs, sort_clike, lang_suffixes
from .interpreterbase import FeatureNew, FeatureNewKwargs
pch_kwargs = set(['c_pch', 'cpp_pch'])
@ -330,6 +331,7 @@ a hard error in the future.''' % name)
myid = subdir_part + '@@' + myid
return myid
@FeatureNewKwargs('build target', '0.40.0', ['build_by_default'])
def process_kwargs(self, kwargs):
if 'build_by_default' in kwargs:
self.build_by_default = kwargs['build_by_default']
@ -1763,6 +1765,9 @@ class CustomTarget(Target):
if 'install_dir' not in kwargs:
raise InvalidArguments('"install_dir" must be specified '
'when installing a target')
if isinstance(kwargs['install_dir'], list):
FeatureNew('multiple install_dir for custom_target', '0.40.0').use()
# If an item in this list is False, the output corresponding to
# the list index of that item will not be installed
self.install_dir = typeslistify(kwargs['install_dir'], (str, bool))

@ -1097,6 +1097,7 @@ class CompilerHolder(InterpreterObject):
mlog.log('Checking for type "', mlog.bold(typename), '": ', hadtxt, sep='')
return had
@FeatureNew('compiler.compute_int', '0.40.0')
@permittedKwargs({
'prefix',
'low',
@ -1151,6 +1152,7 @@ class CompilerHolder(InterpreterObject):
mlog.log('Checking for size of "%s": %d' % (element, esize))
return esize
@FeatureNew('compiler.get_define', '0.40.0')
@permittedKwargs({
'prefix',
'no_builtin_args',
@ -2655,6 +2657,7 @@ to directly access options of other subprojects.''')
'dep {}'.format(found, dirname, wanted, name))
return None
@FeatureNewKwargs('dependency', '0.40.0', ['method'])
@FeatureNewKwargs('dependency', '0.38.0', ['default_options'])
@permittedKwargs(permitted_kwargs['dependency'])
def func_dependency(self, node, args, kwargs):
@ -2833,6 +2836,7 @@ root and issuing %s.
def func_jar(self, node, args, kwargs):
return self.build_target(node, args, kwargs, JarHolder)
@FeatureNewKwargs('build_target', '0.40.0', ['link_whole', 'override_options'])
@permittedKwargs(permitted_kwargs['build_target'])
def func_build_target(self, node, args, kwargs):
if 'target_type' not in kwargs:
@ -2899,6 +2903,7 @@ root and issuing %s.
raise SubdirDoneRequest()
@stringArgs
@FeatureNewKwargs('build target', '0.40.0', ['build_by_default'])
@permittedKwargs(permitted_kwargs['custom_target'])
def func_custom_target(self, node, args, kwargs):
if len(args) != 1:

@ -385,6 +385,7 @@ class GnomeModule(ExtensionModule):
ldflags = fixed_ldflags
return cflags, ldflags, gi_includes
@FeatureNewKwargs('build target', '0.40.0', ['build_by_default'])
@permittedKwargs({'sources', 'nsversion', 'namespace', 'symbol_prefix', 'identifier_prefix',
'export_packages', 'includes', 'dependencies', 'link_with', 'include_directories',
'install', 'install_dir_gir', 'install_dir_typelib', 'extra_args',
@ -636,6 +637,7 @@ class GnomeModule(ExtensionModule):
rv = [scan_target, typelib_target]
return ModuleReturnValue(rv, rv)
@FeatureNewKwargs('build target', '0.40.0', ['build_by_default'])
@permittedKwargs({'build_by_default', 'depend_files'})
def compile_schemas(self, state, args, kwargs):
if args:
@ -877,6 +879,7 @@ This will become a hard error in the future.''')
return []
@FeatureNewKwargs('build target', '0.40.0', ['build_by_default'])
@permittedKwargs({'interface_prefix', 'namespace', 'object_manager', 'build_by_default',
'annotations', 'docbook', 'install_header', 'install_dir', 'sources'})
def gdbus_codegen(self, state, args, kwargs):

@ -19,7 +19,7 @@ from ..mesonlib import MesonException, Popen_safe, extract_as_list, File
from ..dependencies import Qt4Dependency, Qt5Dependency
import xml.etree.ElementTree as ET
from . import ModuleReturnValue, get_include_args
from ..interpreterbase import permittedKwargs
from ..interpreterbase import permittedKwargs, FeatureNewKwargs
_QT_DEPS_LUT = {
4: Qt4Dependency,
@ -181,6 +181,7 @@ class QtBaseModule:
sources.append(moc_output)
return ModuleReturnValue(sources, sources)
@FeatureNewKwargs('build target', '0.40.0', ['build_by_default'])
@permittedKwargs({'ts_files', 'install', 'install_dir', 'build_by_default', 'method'})
def compile_translations(self, state, args, kwargs):
ts_files, install_dir = extract_as_list(kwargs, 'ts_files', 'install_dir', pop=True)

Loading…
Cancel
Save