qemu-devel
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]