aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown
diff options
context:
space:
mode:
Diffstat (limited to 'docs/markdown')
-rw-r--r--docs/markdown/Build-options.md7
-rw-r--r--docs/markdown/snippets/intopt.md6
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)