-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update options on reconfigure when default_options changes
This requires storing the option value and only allow updating if the new value comes from a higher priority source.
- Loading branch information
Showing
9 changed files
with
214 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
## Updated default options are now used on reconfigure | ||
|
||
Updating `project(..., default_options: ['option=new-value'])` used to have no | ||
effect on reconfigure, unless `--wipe` was used. The reason was Meson does not | ||
want a new default value to override a user defined value from command line. | ||
Similar situation was happening when changing environment variables. | ||
|
||
Meson now keeps track from where an option value has been defined and correctly | ||
update the value if old value was not from a higher priority source. | ||
|
||
The priority order is as follow: | ||
- Unset: Value from Meson or from `meson_options.txt`. | ||
- Default: Value from `default_options` keyword argument. | ||
- Environment. | ||
- Cross or native machine file. | ||
- Command line: `-D` argument. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.