meson: avoid warning about comparison of bool and string

meson.build:2907: WARNING: Trying to compare values of different types (bool, str) using ==.
The result of this is undefined and will become a hard error in a future Meson release.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2018-03-09 14:21:08 +01:00
parent f83f8c70bd
commit af4d7860c4
1 changed files with 3 additions and 2 deletions

View File

@ -2903,8 +2903,9 @@ foreach tuple : [
['debug mmap cache'],
]
cond = tuple.get(1, '')
if cond == ''
if tuple.length() >= 2
cond = tuple[1]
else
ident1 = 'HAVE_' + tuple[0].underscorify().to_upper()
ident2 = 'ENABLE_' + tuple[0].underscorify().to_upper()
cond = conf.get(ident1, 0) == 1 or conf.get(ident2, 0) == 1