meson: Add 'check: true' for run_command() calls
Add 'check: true/false' to all run_command() calls as suggested in https://github.com/mesonbuild/meson/issues/9300 to get rid of meson warning "You should add the boolean check kwarg to the run_command call." This makes meson fail if the executed command fails, which makes sense. [Kieran: Ignore failures on utils/genversion.sh] Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
1ddda31f14
commit
5cb17e0c13
1 changed files with 5 additions and 3 deletions
|
@ -18,7 +18,8 @@ project('libcamera', 'c', 'cpp',
|
||||||
# libcamera_git_version.
|
# libcamera_git_version.
|
||||||
libcamera_git_version = run_command('utils/gen-version.sh',
|
libcamera_git_version = run_command('utils/gen-version.sh',
|
||||||
meson.project_build_root(),
|
meson.project_build_root(),
|
||||||
meson.project_source_root()).stdout().strip()
|
meson.project_source_root(),
|
||||||
|
check: false).stdout().strip()
|
||||||
if libcamera_git_version == ''
|
if libcamera_git_version == ''
|
||||||
libcamera_git_version = meson.project_version()
|
libcamera_git_version = meson.project_version()
|
||||||
endif
|
endif
|
||||||
|
@ -148,7 +149,7 @@ subdir('test')
|
||||||
|
|
||||||
if not meson.is_cross_build()
|
if not meson.is_cross_build()
|
||||||
kernel_version_req = '>= 5.0.0'
|
kernel_version_req = '>= 5.0.0'
|
||||||
kernel_version = run_command('uname', '-r').stdout().strip()
|
kernel_version = run_command('uname', '-r', check: true).stdout().strip()
|
||||||
if not kernel_version.version_compare(kernel_version_req)
|
if not kernel_version.version_compare(kernel_version_req)
|
||||||
warning('The current running kernel version @0@ is too old to run libcamera.'
|
warning('The current running kernel version @0@ is too old to run libcamera.'
|
||||||
.format(kernel_version))
|
.format(kernel_version))
|
||||||
|
@ -160,7 +161,8 @@ endif
|
||||||
# Create a symlink from the build root to the source root. This is used when
|
# Create a symlink from the build root to the source root. This is used when
|
||||||
# running libcamera from the build directory to locate resources in the source
|
# running libcamera from the build directory to locate resources in the source
|
||||||
# directory (such as IPA configuration files).
|
# directory (such as IPA configuration files).
|
||||||
run_command('ln', '-fsT', meson.project_source_root(), meson.project_build_root() / 'source')
|
run_command('ln', '-fsT', meson.project_source_root(), meson.project_build_root() / 'source',
|
||||||
|
check: true)
|
||||||
|
|
||||||
configure_file(output : 'config.h', configuration : config_h)
|
configure_file(output : 'config.h', configuration : config_h)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue