meson: reformat with meson formatter
Apply the `meson format` results.
Change-Id: Ie2c74e9b28a7600d0e866d71ce4704fe90032aab
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/meson.build b/meson.build
index 8c1183f..c66115d 100644
--- a/meson.build
+++ b/meson.build
@@ -5,7 +5,7 @@
'warning_level=3',
'werror=true',
'cpp_std=c++23',
- 'buildtype=debugoptimized'
+ 'buildtype=debugoptimized',
],
license: 'Apache-2.0',
version: '1.0',
@@ -30,39 +30,42 @@
cli11_dep = dependency('CLI11')
endif
-boost_args = ['-DBOOST_ASIO_DISABLE_THREADS',
- '-DBOOST_ERROR_CODE_HEADER_ONLY',
- '-DBOOST_SYSTEM_NO_DEPRECATED']
+boost_args = [
+ '-DBOOST_ASIO_DISABLE_THREADS',
+ '-DBOOST_ERROR_CODE_HEADER_ONLY',
+ '-DBOOST_SYSTEM_NO_DEPRECATED',
+]
boost_dep = dependency('boost')
systemd_system_unit_dir = systemd.get_variable(
'systemdsystemunitdir',
- pkgconfig_define: ['prefix', get_option('prefix')])
+ pkgconfig_define: ['prefix', get_option('prefix')],
+)
fs = import('fs')
fs.copyfile(
'phosphor-gpio-monitor@.service',
install: true,
- install_dir: systemd_system_unit_dir
+ install_dir: systemd_system_unit_dir,
)
fs.copyfile(
'phosphor-multi-gpio-monitor.service',
install: true,
- install_dir: systemd_system_unit_dir
+ install_dir: systemd_system_unit_dir,
)
fs.copyfile(
'phosphor-multi-gpio-presence.service',
install: true,
- install_dir: systemd_system_unit_dir
+ install_dir: systemd_system_unit_dir,
)
fs.copyfile(
'phosphor-gpio-presence@.service',
install: true,
- install_dir: systemd_system_unit_dir
+ install_dir: systemd_system_unit_dir,
)
udev = dependency('udev')
@@ -74,16 +77,12 @@
'rules.d',
)
-fs.copyfile(
- '99-gpio-keys.rules',
- install: true,
- install_dir: udev_rules_dir
-)
+fs.copyfile('99-gpio-keys.rules', install: true, install_dir: udev_rules_dir)
fs.copyfile(
'phosphor-multi-gpio-monitor.json',
install: true,
- install_dir: get_option('datadir') / 'phosphor-gpio-monitor'
+ install_dir: get_option('datadir') / 'phosphor-gpio-monitor',
)
libevdev_o = static_library(
@@ -94,50 +93,36 @@
phosphor_dbus_interfaces,
phosphor_logging,
sdbusplus,
- ]
+ ],
)
libmonitor_o = static_library(
'libmonitor_o',
- 'monitor.cpp',
- dependencies: [
- libevdev,
- libsystemd,
- phosphor_logging,
- ],
- link_with: [
- libevdev_o,
- ],
+ 'monitor.cpp',
+ dependencies: [libevdev, libsystemd, phosphor_logging],
+ link_with: [libevdev_o],
)
phosphor_gpio_monitor = executable(
'phosphor-gpio-monitor',
'mainapp.cpp',
- dependencies: [
- cli11_dep,
- libevdev,
- libsystemd,
- phosphor_logging,
- ],
+ dependencies: [cli11_dep, libevdev, libsystemd, phosphor_logging],
install: true,
- link_with: [
- libevdev_o,
- libmonitor_o,
- ],
+ link_with: [libevdev_o, libmonitor_o],
)
executable(
- 'phosphor-multi-gpio-monitor',
- 'gpioMonMain.cpp',
- 'gpioMon.cpp',
- dependencies: [
+ 'phosphor-multi-gpio-monitor',
+ 'gpioMonMain.cpp',
+ 'gpioMon.cpp',
+ dependencies: [
cli11_dep,
libgpiod,
nlohmann_json_dep,
phosphor_dbus_interfaces,
phosphor_logging,
sdbusplus,
- boost_dep
+ boost_dep,
],
cpp_args: boost_args,
install: true,
diff --git a/meson.options b/meson.options
index dda6d81..b87b8c8 100644
--- a/meson.options
+++ b/meson.options
@@ -1,5 +1 @@
-option(
- 'tests', type: 'feature',
- value: 'enabled',
- description: 'Build tests.'
-)
+option('tests', type: 'feature', value: 'enabled', description: 'Build tests.')
diff --git a/presence/meson.build b/presence/meson.build
index 8a9271e..c489709 100644
--- a/presence/meson.build
+++ b/presence/meson.build
@@ -2,15 +2,9 @@
'phosphor-gpio-presence',
'main.cpp',
'gpio_presence.cpp',
- dependencies: [
- cli11_dep,
- libevdev,
- phosphor_logging,
- ],
+ dependencies: [cli11_dep, libevdev, phosphor_logging],
include_directories: '..',
implicit_include_directories: false,
install: true,
- link_with: [
- libevdev_o,
- ],
+ link_with: [libevdev_o],
)
diff --git a/subprojects/packagefiles/boost/meson.build b/subprojects/packagefiles/boost/meson.build
index 2caabf5..6935475 100644
--- a/subprojects/packagefiles/boost/meson.build
+++ b/subprojects/packagefiles/boost/meson.build
@@ -1,11 +1,5 @@
-project('boost',
- 'cpp',
- version : '1.84.0',
- license : 'Boost'
-)
+project('boost', 'cpp', version: '1.84.0', license: 'Boost')
-boost_dep = declare_dependency(
- include_directories : include_directories('.'),
-)
+boost_dep = declare_dependency(include_directories: include_directories('.'))
meson.override_dependency('boost', boost_dep)
diff --git a/test/meson.build b/test/meson.build
index f78d8df..a801f7f 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -1,5 +1,10 @@
gmock_dep = dependency('gmock', disabler: true, required: build_tests)
-gtest_dep = dependency('gtest', main: true, disabler: true, required: build_tests)
+gtest_dep = dependency(
+ 'gtest',
+ main: true,
+ disabler: true,
+ required: build_tests,
+)
if not gtest_dep.found() or not gmock_dep.found()
gtest_proj = import('cmake').subproject('googletest', required: false)
if gtest_proj.found()
@@ -8,13 +13,13 @@
dependency('threads'),
gtest_proj.dependency('gtest'),
gtest_proj.dependency('gtest_main'),
- ]
+ ],
)
gmock_dep = gtest_proj.dependency('gmock')
else
assert(
not get_option('tests').enabled(),
- 'Googletest is required if tests are enabled'
+ 'Googletest is required if tests are enabled',
)
endif
endif
@@ -22,18 +27,11 @@
test(
'utest',
executable(
- 'utest', 'utest.cpp',
- dependencies: [
- gmock_dep,
- gtest_dep,
- libevdev,
- sdbusplus,
- ],
+ 'utest',
+ 'utest.cpp',
+ dependencies: [gmock_dep, gtest_dep, libevdev, sdbusplus],
implicit_include_directories: false,
include_directories: '..',
- link_with: [
- libevdev_o,
- libmonitor_o,
- ]
- )
+ link_with: [libevdev_o, libmonitor_o],
+ ),
)