aboutsummaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorNikolai Artemiev <nartemiev@google.com>2022-07-22 09:58:14 +1000
committerAnastasia Klimchuk <aklm@chromium.org>2022-07-28 00:29:26 +0000
commit336fd0e2cbe068f7f17e746dd8b4f44eb57e8cfe (patch)
tree7888598b3c950d84e650935ba1258ba09f9b5bdf /meson.build
parenta71b22fba3b7e3e5967aea40a57312702831c483 (diff)
downloadflashrom-336fd0e2cbe068f7f17e746dd8b4f44eb57e8cfe.tar.gz
flashrom-336fd0e2cbe068f7f17e746dd8b4f44eb57e8cfe.tar.bz2
flashrom-336fd0e2cbe068f7f17e746dd8b4f44eb57e8cfe.zip
meson: fix various meson build warnings and formatting
- Make run_command() calls check for failures to fix warnings about ignoring errors, see https://github.com/mesonbuild/meson/issues/9300. - Remove `include_directories('../subprojects')` from tests/meson.build. It isn't necessary and caused build warnings due to referencing files outside the tests/ directory. - Fix indent level and formatting in a few places. BUG=none BRANCH=none TEST=meson; ninja; ninja test Change-Id: I17ae0c51d68ed004772a237641f08345f4893200 Signed-off-by: Nikolai Artemiev <nartemiev@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/66060 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Thomas Heijligen <src@posteo.de> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build11
1 files changed, 6 insertions, 5 deletions
diff --git a/meson.build b/meson.build
index 83e175ce..bea55858 100644
--- a/meson.build
+++ b/meson.build
@@ -1,5 +1,5 @@
project('flashromutils', 'c',
- version : run_command('util/getversion.sh', '--version').stdout().strip(),
+ version : run_command('util/getversion.sh', '--version', check : true).stdout().strip(),
license : 'GPL-2.0',
meson_version : '>=0.50.0',
default_options : [
@@ -7,7 +7,8 @@ project('flashromutils', 'c',
'c_std=c99',
'werror=true',
'optimization=s',
- 'debug=false'],
+ 'debug=false',
+ ],
)
# libtool versioning
@@ -465,7 +466,7 @@ pkgg.generate(
)
conf.set('VERSION', version)
-conf.set('MAN_DATE', run_command('util/getversion.sh', '--man-date').stdout().strip())
+conf.set('MAN_DATE', run_command('util/getversion.sh', '--man-date', check : true).stdout().strip())
configure_file(
input : 'flashrom.8.tmpl',
output : 'flashrom.8',
@@ -493,8 +494,8 @@ subdir('util')
# Use `.auto() or .enabled()` instead of `.allowed()` to keep the minimum meson version as low as possible.
# `.allowed()` gets introduced in 0.59.0
if get_option('tests').auto() or get_option('tests').enabled()
-# unit-test framework
-cmocka_dep = dependency(
+ # unit-test framework
+ cmocka_dep = dependency(
'cmocka',
fallback: ['cmocka', 'cmocka_dep'],
required : get_option('tests')