diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2018-02-03 21:30:44 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-02-07 22:10:04 +0200 |
commit | 0204895143d4aacf143be952f962dc47e415c187 (patch) | |
tree | 32da3b7f923358b8416f554317adb6dc20041661 /docs/markdown | |
parent | 20c1cb7d02f77ada1446b592d8915ec4945994e3 (diff) | |
download | meson-0204895143d4aacf143be952f962dc47e415c187.zip meson-0204895143d4aacf143be952f962dc47e415c187.tar.gz meson-0204895143d4aacf143be952f962dc47e415c187.tar.bz2 |
Expose integer options to build option files.
Diffstat (limited to 'docs/markdown')
-rw-r--r-- | docs/markdown/Build-options.md | 7 | ||||
-rw-r--r-- | docs/markdown/snippets/intopt.md | 6 |
2 files changed, 13 insertions, 0 deletions
diff --git a/docs/markdown/Build-options.md b/docs/markdown/Build-options.md index cd7f07d..85e8274 100644 --- a/docs/markdown/Build-options.md +++ b/docs/markdown/Build-options.md @@ -16,6 +16,7 @@ Here is a simple option file. option('someoption', type : 'string', value : 'optval', description : 'An option') option('other_one', type : 'boolean', value : false) option('combo_opt', type : 'combo', choices : ['one', 'two', 'three'], value : 'three') +option('integer_opt', type : 'integer', min : 0, max : 5, value : 3) option('free_array_opt', type : 'array', value : ['one', 'two']) option('array_opt', type : 'array', choices : ['one', 'two', 'three'], value : ['one', 'two']) ``` @@ -39,6 +40,12 @@ A combo allows any one of the values in the `choices` parameter to be selected. If no default value is set then the first value will be the default. +## Integers + +An integer option contains a single integer with optional upper and +lower values that are specified with the `min` and `max` keyword +arguments. Available since Meson version 0.45.0. + ### Arrays Arrays represent an array of strings. By default the array can contain diff --git a/docs/markdown/snippets/intopt.md b/docs/markdown/snippets/intopt.md new file mode 100644 index 0000000..daf660b --- /dev/null +++ b/docs/markdown/snippets/intopt.md @@ -0,0 +1,6 @@ +## Integer options + +There is a new integer option type with optional minimum and maximum +values. It can be specified like this in the `meson_options.txt` file: + + option('integer_option', type : 'integer', min : 0, max : 5, value : 3) |