aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2023-02-05 12:14:56 +0100
committerNirbheek Chauhan <nirbheek@centricular.com>2023-02-19 03:04:06 +0530
commit8d22b915d30c179b67370198ec7b5146b3370935 (patch)
tree618513465a3b67ab620e039f63ea27810773b21a
parent4c9483c6d40f144a23480ef10f5cabf05052fdb7 (diff)
downloadmeson-8d22b915d30c179b67370198ec7b5146b3370935.zip
meson-8d22b915d30c179b67370198ec7b5146b3370935.tar.gz
meson-8d22b915d30c179b67370198ec7b5146b3370935.tar.bz2
mconf: Use auto_features value for auto options
When project is configured with -Dauto_features=disabled, meson configure should not print "auto" value but "disabled" instead.
-rw-r--r--mesonbuild/mconf.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/mesonbuild/mconf.py b/mesonbuild/mconf.py
index 33db57b..46d0463 100644
--- a/mesonbuild/mconf.py
+++ b/mesonbuild/mconf.py
@@ -194,11 +194,14 @@ class Conf:
return
if title:
self.add_title(title)
+ auto = T.cast('coredata.UserFeatureOption', self.coredata.options[OptionKey('auto_features')])
for k, o in sorted(options.items()):
printable_value = o.printable_value()
root = k.as_root()
if o.yielding and k.subproject and root in self.coredata.options:
printable_value = '<inherited from main project>'
+ if isinstance(o, coredata.UserFeatureOption) and o.is_auto():
+ printable_value = auto.printable_value()
self.add_option(str(root), o.description, printable_value, o.choices)
def print_conf(self, pager: bool):