summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Schneider <nioncode+git@gmail.com>2019-01-24 22:36:49 +0100
committerJussi Pakkanen <jpakkane@gmail.com>2019-01-27 20:52:46 +0200
commit3fc8a0dc41622850dc6a50debff3f27b7c080a51 (patch)
tree7842b1de78862a90bc3a192c43af9e3eed1356e2
parent733f9a77652ecb322fff28e46ef11762241bdb09 (diff)
downloadmeson-3fc8a0dc41622850dc6a50debff3f27b7c080a51.tar.gz
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.
-rw-r--r--mesonbuild/interpreter.py7
1 files 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,