diff options
author | John Ericson <git@JohnEricson.me> | 2020-08-03 11:48:27 -0400 |
---|---|---|
committer | John Ericson <git@JohnEricson.me> | 2020-08-03 11:48:27 -0400 |
commit | eaf6343c065842b9719793066e765b2e5f1c2f3b (patch) | |
tree | 1bfeac5297ba489721e704e63c28f33d0fb98990 /mesonbuild/mconf.py | |
parent | 87aa98c1787d800145853a8e84654e4c54ee1078 (diff) | |
parent | 70edf82c6c77902cd64f44848302bbac92d611d8 (diff) | |
download | meson-lang-enum.zip meson-lang-enum.tar.gz meson-lang-enum.tar.bz2 |
Merge remote-tracking branch 'upstream/master' into lang-enumlang-enum
Diffstat (limited to 'mesonbuild/mconf.py')
-rw-r--r-- | mesonbuild/mconf.py | 31 |
1 files changed, 8 insertions, 23 deletions
diff --git a/mesonbuild/mconf.py b/mesonbuild/mconf.py index 6c450da..b38df85 100644 --- a/mesonbuild/mconf.py +++ b/mesonbuild/mconf.py @@ -97,9 +97,9 @@ class Conf: else: print('{0:{width[0]}} {1:{width[1]}} {3}'.format(*line, width=col_widths)) - def split_options_per_subproject(self, options_iter): + def split_options_per_subproject(self, options): result = {} - for k, o in options_iter: + for k, o in options.items(): subproject = '' if ':' in k: subproject, optname = k.split(':') @@ -184,19 +184,7 @@ class Conf: if not self.default_values_only: print(' Build dir ', self.build_dir) - dir_option_names = ['bindir', - 'datadir', - 'includedir', - 'infodir', - 'libdir', - 'libexecdir', - 'localedir', - 'localstatedir', - 'mandir', - 'prefix', - 'sbindir', - 'sharedstatedir', - 'sysconfdir'] + dir_option_names = list(coredata.BUILTIN_DIR_OPTIONS) test_option_names = ['errorlogs', 'stdsplit'] core_option_names = [k for k in self.coredata.builtins if k not in dir_option_names + test_option_names] @@ -211,15 +199,12 @@ class Conf: return 'build.' + k return k[:idx + 1] + 'build.' + k[idx + 1:] - core_options = self.split_options_per_subproject(core_options.items()) - host_compiler_options = self.split_options_per_subproject( - self.coredata.flatten_lang_iterator( - self.coredata.compiler_options.host.items())) + core_options = self.split_options_per_subproject(core_options) build_compiler_options = self.split_options_per_subproject( - (insert_build_prefix(k), o) - for k, o in self.coredata.flatten_lang_iterator( - self.coredata.compiler_options.build.items())) - project_options = self.split_options_per_subproject(self.coredata.user_options.items()) + dict((insert_build_prefix(k), o) + for k, o in self.coredata.flatten_lang_iterator( + self.coredata.compiler_options.build.items()))) + project_options = self.split_options_per_subproject(self.coredata.user_options) show_build_options = self.default_values_only or self.build.environment.is_cross_build() self.add_section('Main project options') |