Add a method to perform a logical AND on a feature object. The method also takes care of raising an error if 'enabled' is ANDed with false. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>pull/8512/head
parent
5298d8eaf1
commit
2f2d99e1d8
6 changed files with 57 additions and 2 deletions
@ -0,0 +1,2 @@ |
||||
project('no fallback', 'c') |
||||
foo = get_option('reqfeature').require(false, error_message: 'frobnicator not available') |
@ -0,0 +1,2 @@ |
||||
option('reqfeature', type : 'feature', value : 'enabled', description : 'A required feature') |
||||
|
@ -0,0 +1,8 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"match": "re", |
||||
"line": ".*/meson\\.build:2:0: ERROR: Feature reqfeature cannot be enabled: frobnicator not available" |
||||
} |
||||
] |
||||
} |
Loading…
Reference in new issue