diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index 895f4ca25..6b8c5b320 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -1217,39 +1217,39 @@ pch_kwargs = set(['c_pch', 'cpp_pch']) lang_arg_kwargs = set(['c_args', 'cpp_args', + 'd_args', + 'fortran_args', 'java_args', - 'rust_args', 'objc_args', 'objcpp_args', - 'fortran_args', + 'rust_args', 'vala_args', - 'd_args', ]) vala_kwargs = set(['vala_header', 'vala_gir', 'vala_vapi']) rust_kwargs = set(['rust_crate_type']) cs_kwargs = set(['resources']) -buildtarget_kwargs = set(['sources', +buildtarget_kwargs = set(['build_by_default', + 'dependencies', + 'extra_files', + 'gui_app', 'link_with', 'link_whole', 'link_args', 'link_depends', 'include_directories', - 'dependencies', - 'gui_app', - 'extra_files', 'install', 'install_rpath', 'install_dir', - 'objects', - 'native', - 'name_suffix', 'name_prefix', - 'build_by_default', - 'vs_module_defs', - 'pic', + 'name_suffix', + 'native', + 'objects', 'override_options', + 'pic', + 'sources', + 'vs_module_defs', ]) build_target_common_kwargs = set() @@ -1275,33 +1275,33 @@ jar_kwargs.update(['main_class']) build_target_kwargs = exe_kwargs.copy() build_target_kwargs.update(['target_type']) -permitted_kwargs = {'project': set(['version', 'meson_version', 'default_options', 'license', 'subproject_dir']), - 'executable': exe_kwargs, - 'shared_library': shlib_kwargs, - 'static_library': stlib_kwargs, - 'shared_module': shmod_kwargs, - 'jar': jar_kwargs, +permitted_kwargs = {'add_global_arguments': set(['language']), + 'add_languages': set(['required']), + 'add_project_arguments': set(['language']), + 'add_test_setup': set(['exe_wrapper', 'gdb', 'timeout_multiplier', 'env']), + 'benchmark': set(['args', 'env', 'should_fail', 'timeout', 'workdir', 'suite']), 'build_target': build_target_kwargs, + 'configure_file': set(['input', 'output', 'configuration', 'command', 'install_dir', 'capture', 'install']), 'custom_target': set(['input', 'output', 'command', 'install', 'install_dir', 'build_always', 'capture', 'depends', 'depend_files', 'depfile', 'build_by_default']), - 'run_target': set(['command', 'depends']), + 'declare_dependency': set(['include_directories', 'link_with', 'sources', 'dependencies', 'compile_args', 'link_args', 'version']), + 'executable': exe_kwargs, + 'find_program': set(['required',]), 'generator': set(['arguments', 'output', 'depfile']), - 'test': set(['args', 'env', 'is_parallel', 'should_fail', 'timeout', 'workdir', 'suite']), - 'benchmark': set(['args', 'env', 'should_fail', 'timeout', 'workdir', 'suite']), + 'include_directories': set(['is_system']), + 'install_data': set(['install_dir', 'install_mode', 'sources']), 'install_headers': set(['install_dir', 'subdir']), 'install_man': set(['install_dir']), - 'install_data': set(['install_dir', 'install_mode', 'sources']), 'install_subdir': set(['install_dir', 'install_mode']), - 'configure_file': set(['input', 'output', 'configuration', 'command', 'install_dir', 'capture', 'install']), - 'include_directories': set(['is_system']), - 'add_global_arguments': set(['language']), - 'add_project_arguments': set(['language']), - 'add_test_setup': set(['exe_wrapper', 'gdb', 'timeout_multiplier', 'env']), - 'add_languages': set(['required']), - 'find_program': set(['required',]), + 'jar': jar_kwargs, + 'project': set(['version', 'meson_version', 'default_options', 'license', 'subproject_dir']), 'run_command': set(['in_builddir']), # INTERNAL + 'run_target': set(['command', 'depends']), + 'shared_library': shlib_kwargs, + 'shared_module': shmod_kwargs, + 'static_library': stlib_kwargs, 'subproject': set(['version', 'default_options']), + 'test': set(['args', 'env', 'is_parallel', 'should_fail', 'timeout', 'workdir', 'suite']), 'vcs_tag': set(['input', 'output', 'fallback', 'command', 'replace_string']), - 'declare_dependency': set(['include_directories', 'link_with', 'sources', 'dependencies', 'compile_args', 'link_args', 'version']), } @@ -1346,53 +1346,53 @@ class Interpreter(InterpreterBase): self.build_def_files = [os.path.join(self.subdir, environment.build_filename)] def build_func_dict(self): - self.funcs.update({'project': self.func_project, - 'message': self.func_message, - 'error': self.func_error, - 'executable': self.func_executable, - 'dependency': self.func_dependency, - 'static_library': self.func_static_lib, - 'shared_library': self.func_shared_lib, - 'shared_module': self.func_shared_module, - 'library': self.func_library, - 'jar': self.func_jar, - 'build_target': self.func_build_target, - 'custom_target': self.func_custom_target, - 'run_target': self.func_run_target, - 'generator': self.func_generator, - 'test': self.func_test, - 'benchmark': self.func_benchmark, - 'install_headers': self.func_install_headers, - 'install_man': self.func_install_man, - 'subdir': self.func_subdir, - 'install_data': self.func_install_data, - 'install_subdir': self.func_install_subdir, - 'configure_file': self.func_configure_file, - 'include_directories': self.func_include_directories, - 'add_global_arguments': self.func_add_global_arguments, + self.funcs.update({'add_global_arguments': self.func_add_global_arguments, 'add_project_arguments': self.func_add_project_arguments, 'add_global_link_arguments': self.func_add_global_link_arguments, 'add_project_link_arguments': self.func_add_project_link_arguments, 'add_test_setup': self.func_add_test_setup, 'add_languages': self.func_add_languages, - 'find_program': self.func_find_program, - 'find_library': self.func_find_library, + 'assert': self.func_assert, + 'benchmark': self.func_benchmark, + 'build_target': self.func_build_target, 'configuration_data': self.func_configuration_data, - 'run_command': self.func_run_command, + 'configure_file': self.func_configure_file, + 'custom_target': self.func_custom_target, + 'declare_dependency': self.func_declare_dependency, + 'dependency': self.func_dependency, + 'environment': self.func_environment, + 'error': self.func_error, + 'executable': self.func_executable, + 'generator': self.func_generator, 'gettext': self.func_gettext, - 'option': self.func_option, 'get_option': self.func_get_option, - 'subproject': self.func_subproject, - 'vcs_tag': self.func_vcs_tag, - 'set_variable': self.func_set_variable, - 'is_variable': self.func_is_variable, 'get_variable': self.func_get_variable, - 'import': self.func_import, 'files': self.func_files, - 'declare_dependency': self.func_declare_dependency, - 'assert': self.func_assert, - 'environment': self.func_environment, + 'find_library': self.func_find_library, + 'find_program': self.func_find_program, + 'include_directories': self.func_include_directories, + 'import': self.func_import, + 'install_data': self.func_install_data, + 'install_headers': self.func_install_headers, + 'install_man': self.func_install_man, + 'install_subdir': self.func_install_subdir, + 'is_variable': self.func_is_variable, + 'jar': self.func_jar, 'join_paths': self.func_join_paths, + 'library': self.func_library, + 'message': self.func_message, + 'option': self.func_option, + 'project': self.func_project, + 'run_target': self.func_run_target, + 'run_command': self.func_run_command, + 'set_variable': self.func_set_variable, + 'subdir': self.func_subdir, + 'subproject': self.func_subproject, + 'shared_library': self.func_shared_lib, + 'shared_module': self.func_shared_module, + 'static_library': self.func_static_lib, + 'test': self.func_test, + 'vcs_tag': self.func_vcs_tag, }) def holderify(self, item):