aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2022-05-12 08:58:46 -0400
committerXavier Claessens <xclaesse@gmail.com>2023-08-07 08:21:05 -0400
commit9df16279971b48787c1db232c274054f173531df (patch)
tree186a5a8ebc4c30c18a28e061c0b6f41e109826ed /docs
parent2a731cc021f4699f73fb0fd23bb0b8ce11c4c510 (diff)
downloadmeson-9df16279971b48787c1db232c274054f173531df.zip
meson-9df16279971b48787c1db232c274054f173531df.tar.gz
meson-9df16279971b48787c1db232c274054f173531df.tar.bz2
Compiler: Add werror kwarg to compiles(), links() and run() methods
Fixes: #5399
Diffstat (limited to 'docs')
-rw-r--r--docs/markdown/snippets/compile_werror.md5
-rw-r--r--docs/yaml/objects/compiler.yaml11
2 files changed, 16 insertions, 0 deletions
diff --git a/docs/markdown/snippets/compile_werror.md b/docs/markdown/snippets/compile_werror.md
new file mode 100644
index 0000000..e81abb8
--- /dev/null
+++ b/docs/markdown/snippets/compile_werror.md
@@ -0,0 +1,5 @@
+## Treat warnings as error in compiler checks
+
+Compiler check methods `compiler.compiles()`, `compiler.links()` and `compiler.run()`
+now have a new `werror: true` keyword argument to treat compiler warnings as error.
+This can be used to check if code compiles without warnings.
diff --git a/docs/yaml/objects/compiler.yaml b/docs/yaml/objects/compiler.yaml
index 3ba9c44..d5d7df5 100644
--- a/docs/yaml/objects/compiler.yaml
+++ b/docs/yaml/objects/compiler.yaml
@@ -127,6 +127,7 @@ methods:
- compiler._dependencies
- compiler._no_builtin_args
- compiler._name
+ - compiler._werror
- name: _header
returns: void
@@ -157,6 +158,16 @@ methods:
When set to a [`feature`](Build-options.md#features) option, the feature
will control if it is searched and whether to fail if not found.
+- name: _werror
+ returns: void
+ description: You have found a bug if you can see this!
+ kwargs:
+ werror:
+ type: bool
+ default: false
+ description: When set to `true`, compiler warnings are treated as error.
+ since: 1.3.0
+
# Star of the actual functions
- name: version
returns: str