diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2022-02-28 15:44:39 -0800 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2022-03-03 10:29:14 -0800 |
commit | 4a2058cb836242a6423870e671b6b76fa48167f3 (patch) | |
tree | 709d4ebeaf2517d975e849e45d4482b51b0b61ec /mesonbuild/modules/cmake.py | |
parent | 71c65392a83f3f293fa70e7fadc610f95a8e8d4e (diff) | |
download | meson-4a2058cb836242a6423870e671b6b76fa48167f3.zip meson-4a2058cb836242a6423870e671b6b76fa48167f3.tar.gz meson-4a2058cb836242a6423870e671b6b76fa48167f3.tar.bz2 |
interpreter: use typed_kwargs for subproject()
Diffstat (limited to 'mesonbuild/modules/cmake.py')
-rw-r--r-- | mesonbuild/modules/cmake.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/mesonbuild/modules/cmake.py b/mesonbuild/modules/cmake.py index f996087..a58ad54 100644 --- a/mesonbuild/modules/cmake.py +++ b/mesonbuild/modules/cmake.py @@ -425,11 +425,18 @@ class CmakeModule(ExtensionModule): deprecated_message='Use options instead', ), ) - def subproject(self, state: ModuleState, args: T.Tuple[str], kwargs: Subproject) -> T.Union[SubprojectHolder, CMakeSubproject]: - if kwargs['cmake_options'] and kwargs['options'] is not None: + def subproject(self, state: ModuleState, args: T.Tuple[str], kwargs_: Subproject) -> T.Union[SubprojectHolder, CMakeSubproject]: + if kwargs_['cmake_options'] and kwargs_['options'] is not None: raise InterpreterException('"options" cannot be used together with "cmake_options"') dirname = args[0] - subp = self.interpreter.do_subproject(dirname, 'cmake', kwargs) + kw: kwargs.DoSubproject = { + 'required': kwargs_['required'], + 'options': kwargs_['options'], + 'cmake_options': kwargs_['cmake_options'], + 'default_options': [], + 'version': [], + } + subp = self.interpreter.do_subproject(dirname, 'cmake', kw) if not subp.found(): return subp return CMakeSubproject(subp) |