diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2018-02-03 21:30:44 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-02-03 22:39:41 +0200 |
commit | e9ed8cf198616c557d6125063b335bbd812dda60 (patch) | |
tree | 2a63f8a069ee6f2040d192929131ad62bb07698e /docs/markdown | |
parent | f25070ec089719a607c545c1b44a678c6bbce5c9 (diff) | |
download | meson-intoption.tar.gz |
Expose integer options to build option files.intoption
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 cd7f07d1b..85e827424 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 000000000..daf660b0d --- /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) |