From 3fc8a0dc41622850dc6a50debff3f27b7c080a51 Mon Sep 17 00:00:00 2001 From: Nicolas Schneider Date: Thu, 24 Jan 2019 22:36:49 +0100 Subject: [PATCH] fix non-default option printing Previously, the default option string was compared to the actual project option that has been converted to the proper type. This lead to messages like 'Option x is: true [default: true]'. Fixes #4806. --- mesonbuild/interpreter.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index aff46d13f..6a795177b 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -2034,9 +2034,10 @@ class Interpreter(InterpreterBase): for def_opt_name, def_opt_value in self.project_default_options.items(): for option_type in env.coredata.get_all_options(): for cur_opt_name, cur_opt_value in option_type.items(): - if (def_opt_name == cur_opt_name and - def_opt_value != cur_opt_value.value): - yield (def_opt_name, def_opt_value, cur_opt_value) + if def_opt_name == cur_opt_name: + def_opt_value = env.coredata.validate_option_value(def_opt_name, def_opt_value) + if def_opt_value != cur_opt_value.value: + yield (def_opt_name, def_opt_value, cur_opt_value) def build_func_dict(self): self.funcs.update({'add_global_arguments': self.func_add_global_arguments,