17/11/2021 13:36, Thomas Monjalon:
> 17/11/2021 21:33, eagost...@nvidia.com:
> > --- a/app/test-gpudev/meson.build
> > +++ b/app/test-gpudev/meson.build
> > @@ -1,5 +1,12 @@
> >  # SPDX-License-Identifier: BSD-3-Clause
> >  # Copyright (c) 2021 NVIDIA Corporation & Affiliates
> >  
> > -sources = files('main.c')
> > -deps = ['gpudev', 'ethdev']
> > +if dpdk_conf.has('RTE_LIB_GPUDEV')
> > +    sources = files('main.c')
> > +    deps = ['gpudev', 'ethdev']
> > +else
> > +    build = false
> > +    reason = 'gpudev library is disabled'
> > +    subdir_done()
> > +endif
> 
> I would prefer the form "if not" so we can save the "else".

Actually no need to check at all in app and driver.
If the dependency is missing the driver is disabled already
with this reason:
        reason = 'missing internal dependency, "@0@"'.format(d)
For the app, there is an automatic message:
        message('Missing dependency "@0@" for app "@1@"'.format(d, name))

> > --- a/lib/meson.build
> > +++ b/lib/meson.build
> > @@ -76,6 +76,7 @@ optional_libs = [
> >          'pdump',
> >          'power',
> >          'vhost',
> > +        'gpudev',
> >  ]
> 
> It should be sorted alphabetically.



Reply via email to