meson: reformat with meson formatter
Apply the `meson format` results.
Change-Id: Ic69760fca3e47474f3f4ffc4e3951c46843905bb
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/meson.build b/meson.build
index 8dc3a6a..02ea2f2 100644
--- a/meson.build
+++ b/meson.build
@@ -1,13 +1,14 @@
project(
- 'phosphor-ledcontroller', 'cpp',
- version : '1.0.0',
+ 'phosphor-ledcontroller',
+ 'cpp',
+ version: '1.0.0',
meson_version: '>=1.1.1',
default_options: [
'warning_level=3',
'werror=true',
'cpp_std=c++23',
- 'buildtype=debugoptimized'
- ]
+ 'buildtype=debugoptimized',
+ ],
)
sdbusplus_dep = dependency('sdbusplus')
@@ -29,19 +30,27 @@
]
udevdir = dependency('udev').get_variable('udevdir')
-install_data(['udev' / 'rules.d' / '70-leds.rules'], install_dir : udevdir / 'rules.d')
+install_data(
+ ['udev' / 'rules.d' / '70-leds.rules'],
+ install_dir: udevdir / 'rules.d',
+)
systemd = dependency('systemd')
-install_data(['systemd' / 'system' / 'phosphor-ledcontroller.service'],
- install_dir: systemd.get_variable(pkgconfig: 'systemdsystemunitdir')
+install_data(
+ ['systemd' / 'system' / 'phosphor-ledcontroller.service'],
+ install_dir: systemd.get_variable(pkgconfig: 'systemdsystemunitdir'),
)
-install_data(['systemd' / 'system' / 'sysfs-led@.service'],
- install_dir: systemd.get_variable(pkgconfig: 'systemdsystemunitdir')
+install_data(
+ ['systemd' / 'system' / 'sysfs-led@.service'],
+ install_dir: systemd.get_variable(pkgconfig: 'systemdsystemunitdir'),
)
dbus = dependency('dbus-1')
-install_data(['dbus-1' / 'system-services' / 'xyz.openbmc_project.LED.Controller.service'],
- install_dir: dbus.get_variable(pkgconfig: 'system_bus_services_dir')
+install_data(
+ [
+ 'dbus-1' / 'system-services' / 'xyz.openbmc_project.LED.Controller.service',
+ ],
+ install_dir: dbus.get_variable(pkgconfig: 'system_bus_services_dir'),
)
sources = [
@@ -57,7 +66,7 @@
implicit_include_directories: true,
dependencies: deps,
install: true,
- install_dir: '/usr/libexec/phosphor-led-sysfs'
+ install_dir: '/usr/libexec/phosphor-led-sysfs',
)
executable(
@@ -67,10 +76,10 @@
implicit_include_directories: true,
dependencies: deps,
install: true,
- install_dir: '/usr/libexec/phosphor-led-sysfs'
+ install_dir: '/usr/libexec/phosphor-led-sysfs',
)
build_tests = get_option('tests')
if build_tests.allowed()
- subdir('test')
+ subdir('test')
endif
diff --git a/meson.options b/meson.options
index a0d316a..cdf492c 100644
--- a/meson.options
+++ b/meson.options
@@ -1 +1 @@
-option('tests', type : 'feature', description : 'Build tests', value: 'enabled')
\ No newline at end of file
+option('tests', type: 'feature', description: 'Build tests', value: 'enabled')
diff --git a/subprojects/packagefiles/boost/meson.build b/subprojects/packagefiles/boost/meson.build
index b5dea0a..413a053 100644
--- a/subprojects/packagefiles/boost/meson.build
+++ b/subprojects/packagefiles/boost/meson.build
@@ -1,9 +1,3 @@
-project('boost',
- 'cpp',
- version : '1.81.0',
- license : 'Boost'
-)
+project('boost', 'cpp', version: '1.81.0', license: 'Boost')
-boost_dep = declare_dependency(
- include_directories : include_directories('.'),
-)
+boost_dep = declare_dependency(include_directories: include_directories('.'))
diff --git a/test/meson.build b/test/meson.build
index e864298..aec8ee3 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -1,49 +1,46 @@
gtest_dep = dependency('gtest', main: true, disabler: true, required: false)
gmock_dep = dependency('gmock', disabler: true, required: false)
if not gtest_dep.found() or not gmock_dep.found()
- gtest_proj = import('cmake').subproject('googletest', required: false)
- if gtest_proj.found()
- gtest_dep = declare_dependency(
- dependencies: [
- dependency('threads'),
- gtest_proj.dependency('gtest'),
- gtest_proj.dependency('gtest_main'),
- ]
- )
- gmock_dep = gtest_proj.dependency('gmock')
- else
- assert(
- not get_option('tests').allowed(),
- 'Googletest is required if tests are enabled'
- )
- endif
+ gtest_proj = import('cmake').subproject('googletest', required: false)
+ if gtest_proj.found()
+ gtest_dep = declare_dependency(
+ dependencies: [
+ dependency('threads'),
+ gtest_proj.dependency('gtest'),
+ gtest_proj.dependency('gtest_main'),
+ ],
+ )
+ gmock_dep = gtest_proj.dependency('gmock')
+ else
+ assert(
+ not get_option('tests').allowed(),
+ 'Googletest is required if tests are enabled',
+ )
+ endif
endif
test_sources = [
- '../physical.cpp',
- '../sysfs.cpp',
- '../interfaces/internal_interface.cpp',
+ '../physical.cpp',
+ '../sysfs.cpp',
+ '../interfaces/internal_interface.cpp',
]
tests = [
- 'physical.cpp',
- 'sysfs.cpp',
- 'test_led_description.cpp',
- 'test_dbus_name.cpp',
+ 'physical.cpp',
+ 'sysfs.cpp',
+ 'test_led_description.cpp',
+ 'test_dbus_name.cpp',
]
foreach t : tests
- test(t,
- executable(
- t.underscorify(),
- t,
- test_sources,
- include_directories: ['..'],
- dependencies: [
- gtest_dep,
- gmock_dep,
- deps
- ]
- )
- )
+ test(
+ t,
+ executable(
+ t.underscorify(),
+ t,
+ test_sources,
+ include_directories: ['..'],
+ dependencies: [gtest_dep, gmock_dep, deps],
+ ),
+ )
endforeach