summaryrefslogtreecommitdiff
path: root/mesonbuild/options.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/options.py')
-rw-r--r--mesonbuild/options.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/mesonbuild/options.py b/mesonbuild/options.py
index 1b2bfc64e..0ada8432c 100644
--- a/mesonbuild/options.py
+++ b/mesonbuild/options.py
@@ -1380,6 +1380,14 @@ class OptionStore:
key = key.evolve(subproject=subproject)
options[key] = valstr
+ # then global settings from machine file and command line
+ # **but not if they are toplevel project options**
+ for key, valstr in itertools.chain(machine_file_options.items(), cmd_line_options.items()):
+ if key.subproject is None and not self.is_project_option(key.as_root()):
+ subp_key = key.evolve(subproject=subproject)
+ # just leave in place the value that was set for the toplevel project
+ options.pop(subp_key, None)
+
# augments from the toplevel project() default_options
for key, valstr in self.pending_subproject_options.items():
if key.subproject == subproject:
@@ -1395,14 +1403,6 @@ class OptionStore:
key = key.evolve(subproject=subproject)
options[key] = valstr
- # then global settings from machine file and command line
- # **but not if they are toplevel project options**
- for key, valstr in itertools.chain(machine_file_options.items(), cmd_line_options.items()):
- if key.subproject is None and not self.is_project_option(key.as_root()):
- subp_key = key.evolve(subproject=subproject)
- self.pending_subproject_options.pop(subp_key, None)
- options.pop(subp_key, None)
-
# then finally per project augments from machine file and command line
for key, valstr in itertools.chain(machine_file_options.items(), cmd_line_options.items()):
if key.subproject == subproject: