build: raise error if requested application is unbuildable
Checks
Commit Message
Similarly to libraries, when setting a list of desired applications,
report if some application cannot be built because of a missing
dependency.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
app/meson.build | 10 ++++++++++
1 file changed, 10 insertions(+)
Comments
On Tue, Jun 18, 2024 at 02:51:12PM +0200, David Marchand wrote:
> Similarly to libraries, when setting a list of desired applications,
> report if some application cannot be built because of a missing
> dependency.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
> app/meson.build | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
On Tue, Jun 18, 2024 at 02:51:12PM +0200, David Marchand wrote:
> Similarly to libraries, when setting a list of desired applications,
> report if some application cannot be built because of a missing
> dependency.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
On Tue, Jun 18, 2024 at 2:57 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
> On Tue, Jun 18, 2024 at 02:51:12PM +0200, David Marchand wrote:
> > Similarly to libraries, when setting a list of desired applications,
> > report if some application cannot be built because of a missing
> > dependency.
> >
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Applied, thanks.
@@ -10,7 +10,9 @@ disable_apps = run_command(list_dir_globs, disable_apps, check: true).stdout().s
enable_apps = ',' + get_option('enable_apps')
enable_apps = run_command(list_dir_globs, enable_apps, check: true).stdout().split()
+require_apps = true
if enable_apps.length() == 0
+ require_apps = false
enable_apps = run_command(list_dir_globs, '*', check: true).stdout().split()
endif
@@ -74,6 +76,10 @@ foreach app:apps
if build
subdir(name)
+ if not build and require_apps
+ error('Cannot build explicitly requested app "@0@".\n'.format(name)
+ + '\tReason: ' + reason)
+ endif
endif
if build
@@ -84,6 +90,10 @@ foreach app:apps
build = false
reason = 'missing internal dependency, "@0@"'.format(d)
message('Missing dependency "@0@" for app "@1@"'.format(d, name))
+ if require_apps
+ error('Cannot build explicitly requested app "@0@".\n'.format(name)
+ + '\tPlease add missing dependency "@0@" to "enable_libs" option'.format(d))
+ endif
break
endif
dep_objs += [get_variable(var_name)]