diff options
author | Niklas Hambüchen <mail@nh2.me> | 2020-02-18 21:37:11 +0100 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2020-02-19 05:56:46 +0530 |
commit | f4b34710d74a9279c4fd3903bd2795bdb3a75a80 (patch) | |
tree | 2ba0891101475b3851695ad9b99cd80e460af911 /docs/markdown/Reference-manual.md | |
parent | 800e4426132d11c524ed4dfa6ef6c1703beada0f (diff) | |
download | meson-f4b34710d74a9279c4fd3903bd2795bdb3a75a80.zip meson-f4b34710d74a9279c4fd3903bd2795bdb3a75a80.tar.gz meson-f4b34710d74a9279c4fd3903bd2795bdb3a75a80.tar.bz2 |
docs: Improve visibility for `.enabled()` etc., add example [skip ci]
Diffstat (limited to 'docs/markdown/Reference-manual.md')
-rw-r--r-- | docs/markdown/Reference-manual.md | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md index acb7e39..475b711 100644 --- a/docs/markdown/Reference-manual.md +++ b/docs/markdown/Reference-manual.md @@ -846,8 +846,10 @@ configuration as-is, which may be absolute, or relative to `prefix`. if you need the absolute path to one of these e.g. to use in a define etc., you should use `get_option('prefix') / get_option('localstatedir')` -For options of type `feature` a special object is returned instead of -a string. See [`feature` options](Build-options.md#features) +For options of type `feature` a +[feature option object](#feature-option-object) +is returned instead of a string. +See [`feature` options](Build-options.md#features) documentation for more details. ### get_variable() @@ -2472,6 +2474,16 @@ library. This object has the following methods: object will only inherit other attributes from its parent as controlled by keyword arguments. +### Feature option object + +The following methods are defined for all [`feature` options](Build-options.md#features): + +- `enabled()` returns whether the feature was set to `'enabled'` +- `disabled()` returns whether the feature was set to `'disabled'` +- `auto()` returns whether the feature was set to `'auto'` + +Feature options are available since 0.47.0. + ### `generator` object This object is returned by [`generator()`](#generator) and contains a |