[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 7/7] rdmacm-mux: convert to Meson
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 7/7] rdmacm-mux: convert to Meson |
Date: |
Thu, 27 Jun 2019 14:21:59 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 |
On 27/06/19 13:38, Markus Armbruster wrote:
>> +if config_host['CONFIG_PVRDMA'] == 'y'
>> + # if not found, CONFIG_PVRDMA should not be set
> Our Makefiles use "either unset or 'y'" booleans pretty pervasively. Is
> it idiomatic meson?
No, the idiomatic way would be to use the found() method. Something like:
# in toplevel meson.build:
ibverbs = cc.find_library('ibverbs')
ibumad = cc.find_library('ibumad')
rdmacm = cc.find_library('rdmacm')
if ibverbs.found() and ibumad.found() and rdmacm.found()
pvrdma = declare_dependency(dependencies: [ibverbs, ibumad, rdmacm]
else
# magic "not found" dependency
pvrdma = dependency('', required: false)
endif
# in contrib/rdmacm-mux/meson.build
if pvrdma.found() then
executable('rdmacm-mux', files('main.c'),
dependencies: [glib, ibumad])
endif
>> + libumad = cc.find_library('ibumad', required: true)
> With configure & make, we have configure check -libumad works, and make
> use it.
>
> Ignorant question: cc.find_library() looks like it checks. Could this
> replace checking in configure?
Yes, see above. However, you would have to remove all uses of
$(RDMA_LIBS) and in the Makefiles first.
Paolo
- [Qemu-devel] [PATCH 1/7] configure: do not include $(...) variables in config-host.mak, (continued)
- [Qemu-devel] [PATCH 1/7] configure: do not include $(...) variables in config-host.mak, Paolo Bonzini, 2019/06/10
- [Qemu-devel] [PATCH 2/7] configure: set $PYTHON to a full path, Paolo Bonzini, 2019/06/10
- [Qemu-devel] [PATCH 4/7] libvhost-user: convert to Meson, Paolo Bonzini, 2019/06/10
- [Qemu-devel] [PATCH 5/7] vhost-user-blk: convert to Meson, Paolo Bonzini, 2019/06/10
- [Qemu-devel] [PATCH 6/7] vhost-user-scsi: convert to Meson, Paolo Bonzini, 2019/06/10
- [Qemu-devel] [PATCH 7/7] rdmacm-mux: convert to Meson, Paolo Bonzini, 2019/06/10
- [Qemu-devel] [PATCH 3/7] configure: integrate Meson in the build system, Paolo Bonzini, 2019/06/10