aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/Reference-manual.md
diff options
context:
space:
mode:
authorDaniel Stone <daniels@collabora.com>2017-04-12 16:00:48 +0100
committerDaniel Stone <daniels@collabora.com>2017-08-31 20:24:20 +0100
commite1ffae0580259343be7665c6b2f014fe71b8c05c (patch)
tree24462ab941900841b2d1e320e2c02fbef0dd992e /docs/markdown/Reference-manual.md
parent7fb1973caca249e284ba6bec7e7a7b2439f9721f (diff)
downloadmeson-e1ffae0580259343be7665c6b2f014fe71b8c05c.zip
meson-e1ffae0580259343be7665c6b2f014fe71b8c05c.tar.gz
meson-e1ffae0580259343be7665c6b2f014fe71b8c05c.tar.bz2
Add Compiler.get_supported_arguments()
Add a helper for the common pattern of: args_to_use = [] foreach arg : candidate_args if cc.has_argument(arg) args_to_use += arg endif endforeach Replaced with: args_to_use = cc.get_supported_arguments(candidate_args)
Diffstat (limited to 'docs/markdown/Reference-manual.md')
-rw-r--r--docs/markdown/Reference-manual.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md
index 91f7edd..e388878 100644
--- a/docs/markdown/Reference-manual.md
+++ b/docs/markdown/Reference-manual.md
@@ -1286,6 +1286,10 @@ the following methods:
- `get_id()` returns a string identifying the compiler. For example,
`gcc`, `msvc`, [and more](Compiler-properties.md#compiler-id).
+- `get_supported_arguments(list_of_string)` returns an array
+ containing only the arguments supported by the compiler, as if
+ `has_argument` were called on them individually.
+
- `compiles(code)` returns true if the code fragment given in the
positional argument compiles, you can specify external dependencies
to use with `dependencies` keyword argument, `code` can be either a