pull/8898/head
parent
377adfb6fb
commit
d5ed8f61a5
9 changed files with 35 additions and 41 deletions
@ -0,0 +1,6 @@ |
||||
## Compiler argument checking for `get_supported_arguments` |
||||
|
||||
The compiler method `get_supported_arguments` now supports |
||||
a new keyword argument named `checked` that can be set to |
||||
one of `warn`, `require` or `off` (defaults to `off`) to |
||||
enforce argument checks. |
@ -1,8 +0,0 @@ |
||||
## Required project & global arguments |
||||
|
||||
The `add_global_arguments` & `add_project_arguments` functions now |
||||
support an optional keyword argument named `required`. Setting it |
||||
to `true` will cause Meson to perform compiler support checks on |
||||
each of the passed arguments as if by calling `has_argument`, which |
||||
means manual checks can now be avoided and instead expressed more |
||||
tersely. |
@ -0,0 +1,4 @@ |
||||
project('compiler argument checking test', 'c') |
||||
|
||||
cc = meson.get_compiler('c') |
||||
add_project_arguments(cc.get_supported_arguments('-meson-goober-arg-for-testing', checked : 'require'), language : 'c') |
@ -0,0 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/115 compiler argument checking/meson.build:4:0: ERROR: Compiler for C does not support \"-meson-goober-arg-for-testing\"" |
||||
} |
||||
] |
||||
} |
@ -1,3 +0,0 @@ |
||||
project('add_project_arguments test', 'c') |
||||
|
||||
add_project_arguments('-meson-goober-arg-for-testing', language : 'c', required : true) |
@ -1,7 +0,0 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/115 required project arguments/meson.build:3:0: ERROR: C compiler does not support \"-meson-goober-arg-for-testing\"" |
||||
} |
||||
] |
||||
} |
Loading…
Reference in new issue