On 02/10/20 22:37, Peter Maydell wrote:
> ../src/meson.build:753: 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.
> Configuring config-host.h using configuration
> Program scripts/hxtool found: YES
> Program scripts/shaderinclude.pl found: YES
> Program scripts/qapi-gen.py found: YES
> Program scripts/qemu-version.sh found: YES
> Run-time dependency threads found: YES
> Program keycodemapdb/tools/keymap-gen found: YES
> Program scripts/decodetree.py found: YES
This can be rewritten like
-if capstone_opt == 'disabled'
- capstone_opt = false
-elif capstone_opt in ['enabled', 'auto', 'system']
+if capstone_opt in ['enabled', 'auto', 'system']
have_internal = fs.exists('capstone/Makefile')
capstone = dependency('capstone', static: enable_static,
required: capstone_opt == 'system' or
capstone_opt == 'enabled' and not
have_internal)
if capstone.found()
capstone_opt = 'system'
elif have_internal
capstone_opt = 'internal'
else
- capstone_opt = false
+ capstone_opt = 'disabled'
endif
endif
if capstone_opt == 'internal'
...
-summary_info += {'capstone': capstone_opt}
+summary_info += {'capstone': capstone_opt == 'disabled' ? false :
capstone_opt}
That said, this also showed a bug which can be fixed like this:
- have_internal = fs.exists('capstone/Makefile')
+ have_internal = fs.exists(meson.current_source_dir() / 'capstone/Makefile')
Paolo