diff options
| author | Xavier Claessens <xavier.claessens@collabora.com> | 2022-04-21 11:00:48 -0400 |
|---|---|---|
| committer | Eli Schwartz <eschwartz93@gmail.com> | 2022-04-21 14:18:29 -0400 |
| commit | 3c8343b4837744ae7dc1ee21eeefb93cd044b611 (patch) | |
| tree | a354996fb89c4bd105536f30b1215774396defcf /docs/markdown/Build-options.md | |
| parent | 9528e7deb0e883efde90f7bca60277ad06d62d47 (diff) | |
| download | meson-3c8343b4837744ae7dc1ee21eeefb93cd044b611.tar.gz | |
Allow deprecating an option for a new one
Diffstat (limited to 'docs/markdown/Build-options.md')
| -rw-r--r-- | docs/markdown/Build-options.md | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/markdown/Build-options.md b/docs/markdown/Build-options.md index 4b66cbfc5..b8f14078c 100644 --- a/docs/markdown/Build-options.md +++ b/docs/markdown/Build-options.md @@ -149,6 +149,21 @@ option('o4', type: 'feature', deprecated: {'true': 'enabled', 'false': 'disabled option('o5', type: 'boolean', deprecated: {'enabled': 'true', 'disabled': 'false', 'auto': 'false'}) ``` +Since *0.63.0* the `deprecated` keyword argument can take the name of a new option +that replace this option. In that case, setting a value on the deprecated option +will set the value on both the old and new names, assuming they accept the same +values. + +```meson +# A boolean option has been replaced by a feature with another name, old true/false values +# are accepted by the new option for backward compatibility. +option('o6', type: 'boolean', value: 'true', deprecated: 'o7') +option('o7', type: 'feature', value: 'enabled', deprecated: {'true': 'enabled', 'false': 'disabled'}) + +# A project option is replaced by a module option +option('o8', type: 'string', value: '', deprecated: 'python.platlibdir') +``` + ## Using build options ```meson |
