summaryrefslogtreecommitdiff
path: root/mesonbuild/modules/cmake.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2024-08-27 13:11:32 -0700
committerDylan Baker <dylan@pnwbakers.com>2024-10-01 08:26:40 -0700
commit60e2da24c03039b007d9319a43e7f7ff1895e44c (patch)
tree0cc022ecfd14b154a188c144533d86ead68f67cc /mesonbuild/modules/cmake.py
parent626f4fd244f29c86469b5675ff7d48e32bf5d82d (diff)
downloadmeson-60e2da24c03039b007d9319a43e7f7ff1895e44c.tar.gz
modules/cmake: use typed_pos_args for remaining subproject methods
Since these are all more-or-less the same
Diffstat (limited to 'mesonbuild/modules/cmake.py')
-rw-r--r--mesonbuild/modules/cmake.py19
1 files changed, 9 insertions, 10 deletions
diff --git a/mesonbuild/modules/cmake.py b/mesonbuild/modules/cmake.py
index b73c90462..d437d7d7b 100644
--- a/mesonbuild/modules/cmake.py
+++ b/mesonbuild/modules/cmake.py
@@ -18,7 +18,6 @@ from ..interpreterbase import (
FeatureNew,
FeatureNewKwargs,
- stringArgs,
permittedKwargs,
noPosargs,
noKwargs,
@@ -148,21 +147,21 @@ class CMakeSubproject(ModuleObject):
return orig
@noKwargs
- @stringArgs
- def include_directories(self, state: ModuleState, args: T.List[str], kwargs: TYPE_kwargs) -> build.IncludeDirs:
- info = self._args_to_info(args)
+ @typed_pos_args('cmake.subproject.include_directories', str)
+ def include_directories(self, state: ModuleState, args: T.Tuple[str], kwargs: TYPE_kwargs) -> build.IncludeDirs:
+ info = self._args_to_info(list(args))
return self.get_variable(state, [info['inc']], kwargs)
@noKwargs
- @stringArgs
- def target(self, state: ModuleState, args: T.List[str], kwargs: TYPE_kwargs) -> build.Target:
- info = self._args_to_info(args)
+ @typed_pos_args('cmake.subproject.target', str)
+ def target(self, state: ModuleState, args: T.Tuple[str], kwargs: TYPE_kwargs) -> build.Target:
+ info = self._args_to_info(list(args))
return self.get_variable(state, [info['tgt']], kwargs)
@noKwargs
- @stringArgs
- def target_type(self, state: ModuleState, args: T.List[str], kwargs: TYPE_kwargs) -> str:
- info = self._args_to_info(args)
+ @typed_pos_args('cmake.subproject.target_type', str)
+ def target_type(self, state: ModuleState, args: T.Tuple[str], kwargs: TYPE_kwargs) -> str:
+ info = self._args_to_info(list(args))
return info['func']
@noPosargs