diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2018-12-18 14:32:25 -0500 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-12-20 23:01:36 +0200 |
commit | 9b13fb367250444377200911bf50918b7abf2676 (patch) | |
tree | 51c84c6b542d434af9b5b8c056057bdae9823522 /mesonbuild/coredata.py | |
parent | f9a35e08acd34173355fbaea391045373d931abb (diff) | |
download | meson-9b13fb367250444377200911bf50918b7abf2676.zip meson-9b13fb367250444377200911bf50918b7abf2676.tar.gz meson-9b13fb367250444377200911bf50918b7abf2676.tar.bz2 |
Factor out more option iterating
Diffstat (limited to 'mesonbuild/coredata.py')
-rw-r--r-- | mesonbuild/coredata.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py index 16b9d42..d70c230 100644 --- a/mesonbuild/coredata.py +++ b/mesonbuild/coredata.py @@ -483,8 +483,13 @@ class CoreData: yield self.compiler_options yield self.base_options + def get_all_options(self): + return chain( + iter([self.builtins]), + self._get_all_nonbuiltin_options()) + def validate_option_value(self, option_name, override_value): - for opts in chain(iter([self.builtins]), self._get_all_nonbuiltin_options()): + for opts in self.get_all_options(): if option_name in opts: opt = opts[option_name] return opt.validate_value(override_value) |