Merge pull request #8898 from e820/interpreter-required-arguments
interpreter: Add checked kwarg to compiler.get_supported_argumentspull/8912/head
commit
a44c1d18c1
5 changed files with 35 additions and 4 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. |
@ -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\"" |
||||
} |
||||
] |
||||
} |
Loading…
Reference in new issue