aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules/sourceset.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2021-12-06 15:27:45 -0800
committerEli Schwartz <eschwartz93@gmail.com>2022-01-18 17:53:29 -0500
commit5074e2d3b5837f64ef008b359e50765675c528ab (patch)
treeddea2131d2acc9e53c091add12a618ca8d7042fb /mesonbuild/modules/sourceset.py
parent23af9e4c1a77072218bc3123bc1151b4845049d5 (diff)
downloadmeson-5074e2d3b5837f64ef008b359e50765675c528ab.zip
meson-5074e2d3b5837f64ef008b359e50765675c528ab.tar.gz
meson-5074e2d3b5837f64ef008b359e50765675c528ab.tar.bz2
interpreter: replace ConfigurationDataObject with ConfigurationDataHolder
This is much cleaner, and more in line with the way we handle interpreter objects in modern meson practice
Diffstat (limited to 'mesonbuild/modules/sourceset.py')
-rw-r--r--mesonbuild/modules/sourceset.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/mesonbuild/modules/sourceset.py b/mesonbuild/modules/sourceset.py
index ba8b300..515e670 100644
--- a/mesonbuild/modules/sourceset.py
+++ b/mesonbuild/modules/sourceset.py
@@ -154,8 +154,12 @@ class SourceSet(MutableModuleObject):
def _get_from_config_data(key):
nonlocal config_cache
if key not in config_cache:
- args = [key] if strict else [key, False]
- config_cache[key] = config_data.get_method(args, {})
+ if key in config_data:
+ config_cache[key] = config_data.get(key)[0]
+ elif strict:
+ raise InvalidArguments(f'sourceset.apply: key "{key}" not in passed configuration, and strict set.')
+ else:
+ config_cache[key] = False
return config_cache[key]
files = self.collect(_get_from_config_data, False)