meson: reformat with meson formatter
Apply the `meson format` results.
Change-Id: I5e218b58822e02ead2f37a069da4c0034c5005f5
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/libmapper/test/meson.build b/libmapper/test/meson.build
index 203f0c3..a3dc60a 100644
--- a/libmapper/test/meson.build
+++ b/libmapper/test/meson.build
@@ -1,13 +1,17 @@
-tests = [
- [ 'mapper', [ declare_dependency(sources: [ '../mapper.c', 'utils.c' ]) ]],
-]
+tests = [['mapper', [declare_dependency(sources: ['../mapper.c', 'utils.c'])]]]
foreach t : tests
name = t[0]
extra_deps = t[1]
- test(name, executable(name.underscorify(), name + '.cpp',
- implicit_include_directories: false,
- dependencies: [gtest, gmock, sdbusplus, extra_deps],
- include_directories: ['../..']),
- workdir: meson.current_source_dir())
+ test(
+ name,
+ executable(
+ name.underscorify(),
+ name + '.cpp',
+ implicit_include_directories: false,
+ dependencies: [gtest, gmock, sdbusplus, extra_deps],
+ include_directories: ['../..'],
+ ),
+ workdir: meson.current_source_dir(),
+ )
endforeach
diff --git a/meson.build b/meson.build
index 8b2f7a5..c5d05e3 100644
--- a/meson.build
+++ b/meson.build
@@ -1,6 +1,7 @@
project(
'phosphor-objmgr',
- 'c', 'cpp',
+ 'c',
+ 'cpp',
default_options: [
'buildtype=debugoptimized',
'cpp_std=c++23',
@@ -22,23 +23,25 @@
phosphor_logging = dependency('phosphor-logging')
phosphor_dbus_interfaces = dependency('phosphor-dbus-interfaces')
sdbusplus = dependency('sdbusplus')
-boost = dependency('boost', version : '>=1.79.0', required: false, include_type: 'system')
+boost = dependency(
+ 'boost',
+ version: '>=1.79.0',
+ required: false,
+ include_type: 'system',
+)
if not boost.found()
- subproject('boost', required: false)
- boost_inc = include_directories('subprojects/boost_1_79_0/', is_system:true)
- boost = declare_dependency(include_directories : boost_inc)
- boost = boost.as_system('system')
+ subproject('boost', required: false)
+ boost_inc = include_directories('subprojects/boost_1_79_0/', is_system: true)
+ boost = declare_dependency(include_directories: boost_inc)
+ boost = boost.as_system('system')
endif
add_project_arguments(
- [
- '-DBOOST_ASIO_DISABLE_THREADS',
- '-DBOOST_ASIO_NO_DEPRECATED',
- ],
+ ['-DBOOST_ASIO_DISABLE_THREADS', '-DBOOST_ASIO_NO_DEPRECATED'],
language: 'cpp',
)
if get_option('buildtype').startswith('debug')
- add_project_arguments('-DMAPPER_ENABLE_DEBUG', language : 'cpp')
+ add_project_arguments('-DMAPPER_ENABLE_DEBUG', language: 'cpp')
endif
if get_option('tests').allowed()
@@ -52,13 +55,13 @@
dependency('threads'),
gtest_proj.dependency('gtest'),
gtest_proj.dependency('gtest_main'),
- ]
+ ],
)
gmock = gtest_proj.dependency('gmock')
else
assert(
not get_option('tests').allowed(),
- 'Googletest is required if tests are enabled'
+ 'Googletest is required if tests are enabled',
)
endif
endif
@@ -71,29 +74,32 @@
libmapper = library(
'mapper',
'libmapper/mapper.c',
- dependencies: [ dependency('libsystemd') ],
+ dependencies: [dependency('libsystemd')],
gnu_symbol_visibility: 'hidden',
version: meson.project_version(),
- install: true)
+ install: true,
+)
mapper_dep = declare_dependency(
link_with: libmapper,
include_directories: include_directories('libmapper'),
- dependencies: [ dependency('libsystemd') ],
+ dependencies: [dependency('libsystemd')],
)
import('pkgconfig').generate(
name: 'libmapper',
description: 'OpenBMC service discovery utility library',
version: meson.project_version(),
- libraries: libmapper)
+ libraries: libmapper,
+)
executable(
'mapper',
'libmapper/app.c',
link_with: libmapper,
- dependencies: [ dependency('libsystemd') ],
- install: true)
+ dependencies: [dependency('libsystemd')],
+ install: true,
+)
mapperx = executable(
'mapperx',
@@ -114,59 +120,60 @@
],
install: true,
install_dir: join_paths(
- get_option('prefix'), get_option('libexecdir'), meson.project_name())
+ get_option('prefix'),
+ get_option('libexecdir'),
+ meson.project_name(),
+ ),
)
meson.override_find_program('mapperx', mapperx)
systemd_system_unit_dir = dependency('systemd').get_variable(
- 'systemdsystemunitdir'
+ 'systemdsystemunitdir',
)
conf = configuration_data()
conf.set('BINDIR', join_paths(get_option('prefix'), get_option('bindir')))
-conf.set('LIBEXECDIR', join_paths(
- get_option('prefix'), get_option('libexecdir')))
+conf.set(
+ 'LIBEXECDIR',
+ join_paths(get_option('prefix'), get_option('libexecdir')),
+)
unit_files = [
'xyz.openbmc_project.ObjectMapper.service',
'mapper-subtree-remove@.service',
- 'mapper-wait@.service'
+ 'mapper-wait@.service',
]
foreach u : unit_files
configure_file(
configuration: conf,
- input : join_paths('src/systemd', u) + '.in',
- install : true,
+ input: join_paths('src/systemd', u) + '.in',
+ install: true,
install_dir: systemd_system_unit_dir,
- output : u
+ output: u,
)
endforeach
dbus_system_bus_services_dir = dependency('dbus-1').get_variable(
'system_bus_services_dir',
- pkgconfig_define: ['prefix', get_option('prefix')]
+ pkgconfig_define: ['prefix', get_option('prefix')],
)
install_data(
'src/dbus/xyz.openbmc_project.ObjectMapper.service',
- install_dir: dbus_system_bus_services_dir)
+ install_dir: dbus_system_bus_services_dir,
+)
install_data(
'src/dbus/xyz.openbmc_project.ObjectMapper.conf',
- install_dir: get_option('datadir') / 'dbus-1' / 'system.d')
+ install_dir: get_option('datadir') / 'dbus-1' / 'system.d',
+)
if not get_option('unit-failure-monitor').disabled()
executable(
'phosphor-unit-failure-monitor',
- [
- 'fail-monitor/main.cpp',
- 'fail-monitor/monitor.cpp',
- ],
- dependencies: [
- cli11_dep,
- phosphor_logging,
- ],
- install: true
+ ['fail-monitor/main.cpp', 'fail-monitor/monitor.cpp'],
+ dependencies: [cli11_dep, phosphor_logging],
+ install: true,
)
endif
diff --git a/meson.options b/meson.options
index bf610a6..109c40e 100644
--- a/meson.options
+++ b/meson.options
@@ -1,13 +1,8 @@
-option(
- 'tests',
- type: 'feature',
- value: 'enabled',
- description: 'Build tests'
-)
+option('tests', type: 'feature', value: 'enabled', description: 'Build tests')
option(
'unit-failure-monitor',
type: 'feature',
value: 'enabled',
- description: 'Build phosphor-unit-failure-monitor'
+ description: 'Build phosphor-unit-failure-monitor',
)
diff --git a/src/test/meson.build b/src/test/meson.build
index c377a64..1d42dfd 100644
--- a/src/test/meson.build
+++ b/src/test/meson.build
@@ -3,20 +3,26 @@
handler_cpp_dep = declare_dependency(sources: '../handler.cpp')
tests = [
- [ 'well_known', [ associations_cpp_dep, processing_cpp_dep ]],
- [ 'need_to_introspect', [ associations_cpp_dep, processing_cpp_dep ]],
- [ 'associations', [ associations_cpp_dep ]],
- [ 'name_change', [ associations_cpp_dep, processing_cpp_dep ]],
- [ 'interfaces_added', [ associations_cpp_dep, processing_cpp_dep ]],
- [ 'handler', [ handler_cpp_dep, sdbusplus, phosphor_dbus_interfaces ]],
+ ['well_known', [associations_cpp_dep, processing_cpp_dep]],
+ ['need_to_introspect', [associations_cpp_dep, processing_cpp_dep]],
+ ['associations', [associations_cpp_dep]],
+ ['name_change', [associations_cpp_dep, processing_cpp_dep]],
+ ['interfaces_added', [associations_cpp_dep, processing_cpp_dep]],
+ ['handler', [handler_cpp_dep, sdbusplus, phosphor_dbus_interfaces]],
]
foreach t : tests
- name = t[0]
- extra_deps = t[1]
- test(name, executable(name.underscorify(), name + '.cpp',
- implicit_include_directories: false,
- dependencies: [boost, gtest, gmock, sdbusplus, extra_deps],
- include_directories: ['../..']),
- workdir: meson.current_source_dir())
+ name = t[0]
+ extra_deps = t[1]
+ test(
+ name,
+ executable(
+ name.underscorify(),
+ name + '.cpp',
+ implicit_include_directories: false,
+ dependencies: [boost, gtest, gmock, sdbusplus, extra_deps],
+ include_directories: ['../..'],
+ ),
+ workdir: meson.current_source_dir(),
+ )
endforeach