[dpdk-dev] [PATCH] examples: skip example when missing dependencies
David Marchand
david.marchand at redhat.com
Sat Nov 6 09:49:45 CET 2021
On Fri, Nov 5, 2021 at 2:39 PM Bruce Richardson
<bruce.richardson at intel.com> wrote:
> > @@ -104,6 +104,22 @@ foreach example: examples
> > deps = ['eal', 'mempool', 'net', 'mbuf', 'ethdev', 'cmdline']
> > subdir(example)
> >
> > + if build
> > + dep_objs = ext_deps
> > + foreach d:deps
> > + if not build
> > + break
> > + endif
>
> I believe this check can be removed by just putting "break" after the
> "message()" call below.
I took the inspiration from drivers/meson.build (where I suppose, the
if not build in the loop is to catch a build = false set by the subdir
meson.build).
It's more readable with a break where expected.
v2 incoming.
>
> > + var_name = get_option('default_library') + '_rte_' + d
> > + if not is_variable(var_name)
> > + build = false
> > + message('Missing dependency "@0@" for example "@1@"'.format(d, name))
> > + else
> > + dep_objs += [get_variable(var_name)]
> > + endif
> > + endforeach
> > + endif
> > +
>
Thanks.
--
David Marchand
More information about the dev
mailing list