Useful in case of boolean values to distinguish between a boolean value having been set in the native/cross file and not having been provided, which can't be achieved by passing a fallback parameter to .get_external_property().pull/8422/head
parent
c5aee36fa2
commit
ace22f21a7
5 changed files with 51 additions and 2 deletions
@ -0,0 +1,7 @@ |
||||
## Check if native or cross-file properties exist |
||||
|
||||
It is now possible to check whether a native property or a cross-file property |
||||
exists with `meson.has_external_property('foo')`. This is useful if the |
||||
property in question is a boolean and one wants to distinguish between |
||||
"set" and "not provided" which can't be done the usual way by passing a |
||||
fallback parameter to `meson.get_external_property()` in this particular case. |
@ -1,3 +1,4 @@ |
||||
[properties] |
||||
astring = 'cross' |
||||
anarray = ['one', 'two'] |
||||
anarray = ['one', 'two'] |
||||
red = true |
||||
|
Loading…
Reference in new issue