aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2022-02-21 21:23:43 -0500
committerDylan Baker <dylan@pnwbakers.com>2022-03-01 12:13:24 -0800
commitd39b3300753dca459f300e29fad7d8f74013c721 (patch)
treeb6d0fc539d7fdf8935523692ab712b3317aa4229 /mesonbuild/modules
parent2b04e8c5e5c9e65a50b379ed8101139885c44a89 (diff)
downloadmeson-d39b3300753dca459f300e29fad7d8f74013c721.zip
meson-d39b3300753dca459f300e29fad7d8f74013c721.tar.gz
meson-d39b3300753dca459f300e29fad7d8f74013c721.tar.bz2
clean up FeatureCheck signature to move location to use time
The point of a .use() function is because we don't always have the information we need to use a feature check, so we allow creating the feature and then storing it for later use. When implementing location checks, although it is optional, actually using it violated that design. Move the location out of the init method for FeatureCheck itself. It remains compatible with all cases of .single_use(), but fix the rest up.
Diffstat (limited to 'mesonbuild/modules')
-rw-r--r--mesonbuild/modules/unstable_external_project.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/modules/unstable_external_project.py b/mesonbuild/modules/unstable_external_project.py
index 164af9b..2a74e8b 100644
--- a/mesonbuild/modules/unstable_external_project.py
+++ b/mesonbuild/modules/unstable_external_project.py
@@ -101,7 +101,7 @@ class ExternalProject(NewExtensionModule):
def _configure(self, state: 'ModuleState') -> None:
if self.configure_command == 'waf':
- FeatureNew('Waf external project', '0.60.0', location=state.current_node).use(self.subproject)
+ FeatureNew('Waf external project', '0.60.0').use(self.subproject, state.current_node)
waf = state.find_program('waf')
configure_cmd = waf.get_command()
configure_cmd += ['configure', '-o', str(self.build_dir)]
@@ -176,7 +176,7 @@ class ExternalProject(NewExtensionModule):
if key_format in option:
break
else:
- FeatureNew('Default configure_option', '0.57.0', location=state.current_node).use(self.subproject)
+ FeatureNew('Default configure_option', '0.57.0').use(self.subproject, state.current_node)
self.configure_options.append(default)
def _format_options(self, options: T.List[str], variables: T.List[T.Tuple[str, str, str]]) -> T.List[str]: