meson: reformat with meson formatter
Apply the `meson format` results.
Change-Id: I4c28a606dbfc4220abca7130c9c41686352e143c
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/bifurcation/meson.build b/bifurcation/meson.build
index 5e1050d..6f9fd3d 100644
--- a/bifurcation/meson.build
+++ b/bifurcation/meson.build
@@ -1,20 +1,18 @@
bifurcation_inc = include_directories('.')
-bifurcation_deps = [
- stdplus,
-]
+bifurcation_deps = [stdplus]
bifurcation_lib = static_library(
- 'bifurcation',
- 'bifurcation_static.cpp',
- conf_h,
- dependencies: bifurcation_deps,
- include_directories: [bifurcation_inc, root_inc],
- install: false,
+ 'bifurcation',
+ 'bifurcation_static.cpp',
+ conf_h,
+ dependencies: bifurcation_deps,
+ include_directories: [bifurcation_inc, root_inc],
+ install: false,
)
bifurcation_dep = declare_dependency(
- dependencies: bifurcation_deps,
- include_directories: bifurcation_inc,
- link_with: bifurcation_lib,
+ dependencies: bifurcation_deps,
+ include_directories: bifurcation_inc,
+ link_with: bifurcation_lib,
)
diff --git a/meson.build b/meson.build
index 35404cd..9805fcb 100644
--- a/meson.build
+++ b/meson.build
@@ -1,102 +1,98 @@
project(
- 'google-ipmi-sys',
- 'cpp',
- version: '0.1',
- meson_version: '>=1.1.1',
- default_options: [
- 'cpp_std=c++23',
- 'warning_level=3',
- 'werror=true',
- ])
+ 'google-ipmi-sys',
+ 'cpp',
+ version: '0.1',
+ meson_version: '>=1.1.1',
+ default_options: ['cpp_std=c++23', 'warning_level=3', 'werror=true'],
+)
root_inc = include_directories('.')
conf_data = configuration_data()
-conf_data.set_quoted('STATIC_BIFURCATION_CONFIG', get_option('static-bifurcation'))
-conf_h = configure_file(
- output: 'config.h',
- configuration: conf_data)
+conf_data.set_quoted(
+ 'STATIC_BIFURCATION_CONFIG',
+ get_option('static-bifurcation'),
+)
+conf_h = configure_file(output: 'config.h', configuration: conf_data)
bm_conf_data = configuration_data()
bm_conf_data.set10('BARE_METAL', get_option('bare_metal'))
bm_conf_data.set_quoted('BM_SIGNAL_PATH', get_option('bm-signal-path'))
-bm_conf_h = configure_file(
- output: 'bm_config.h',
- configuration: bm_conf_data)
+bm_conf_h = configure_file(output: 'bm_config.h', configuration: bm_conf_data)
meson.get_compiler('cpp').has_header_symbol(
- 'ipmid/api.h',
- 'ipmid_get_sd_bus_connection')
+ 'ipmid/api.h',
+ 'ipmid_get_sd_bus_connection',
+)
stdplus = dependency('stdplus')
subdir('bifurcation')
sys_pre = declare_dependency(
- include_directories: root_inc,
- dependencies: [
- dependency('nlohmann_json', include_type: 'system'),
- dependency('phosphor-dbus-interfaces'),
- dependency('phosphor-logging'),
- dependency('sdbusplus'),
- stdplus,
- bifurcation_dep,
- ])
+ include_directories: root_inc,
+ dependencies: [
+ dependency('nlohmann_json', include_type: 'system'),
+ dependency('phosphor-dbus-interfaces'),
+ dependency('phosphor-logging'),
+ dependency('sdbusplus'),
+ stdplus,
+ bifurcation_dep,
+ ],
+)
sys_lib = static_library(
- 'sys',
- 'bios_setting.cpp',
- 'bm_instance.cpp',
- 'bmc_mode.cpp',
- 'cable.cpp',
- 'cpld.cpp',
- 'entity_name.cpp',
- 'eth.cpp',
- 'flash_size.cpp',
- 'handler.cpp',
- 'host_power_off.cpp',
- 'ipmi.cpp',
- 'linux_boot_done.cpp',
- 'machine_name.cpp',
- 'pcie_i2c.cpp',
- 'google_accel_oob.cpp',
- 'pcie_bifurcation.cpp',
- 'file_system_wrapper.cpp',
- 'psu.cpp',
- 'util.cpp',
- implicit_include_directories: false,
- dependencies: sys_pre)
+ 'sys',
+ 'bios_setting.cpp',
+ 'bm_instance.cpp',
+ 'bmc_mode.cpp',
+ 'cable.cpp',
+ 'cpld.cpp',
+ 'entity_name.cpp',
+ 'eth.cpp',
+ 'flash_size.cpp',
+ 'handler.cpp',
+ 'host_power_off.cpp',
+ 'ipmi.cpp',
+ 'linux_boot_done.cpp',
+ 'machine_name.cpp',
+ 'pcie_i2c.cpp',
+ 'google_accel_oob.cpp',
+ 'pcie_bifurcation.cpp',
+ 'file_system_wrapper.cpp',
+ 'psu.cpp',
+ 'util.cpp',
+ implicit_include_directories: false,
+ dependencies: sys_pre,
+)
-sys_dep = declare_dependency(
- link_with: sys_lib,
- dependencies: sys_pre)
+sys_dep = declare_dependency(link_with: sys_lib, dependencies: sys_pre)
if get_option('tests').allowed()
- subdir('test')
+ subdir('test')
endif
shared_module(
- 'googlesys',
- 'main.cpp',
- implicit_include_directories: false,
- dependencies: [
- dependency('libipmid'),
- sys_dep,
- ],
- install: true,
- install_dir: get_option('libdir') / 'ipmid-providers')
+ 'googlesys',
+ 'main.cpp',
+ implicit_include_directories: false,
+ dependencies: [dependency('libipmid'), sys_dep],
+ install: true,
+ install_dir: get_option('libdir') / 'ipmid-providers',
+)
systemd_dep = dependency('systemd')
if systemd_dep.found()
- install_data(
- 'gbmc-host-poweroff.target',
- 'gbmc-psu-hardreset.target',
- 'gbmc-psu-hardreset-pre.target',
- 'gbmc-psu-hardreset-time.service',
- install_dir: systemd_dep.get_variable('systemdsystemunitdir'))
+ install_data(
+ 'gbmc-host-poweroff.target',
+ 'gbmc-psu-hardreset.target',
+ 'gbmc-psu-hardreset-pre.target',
+ 'gbmc-psu-hardreset-time.service',
+ install_dir: systemd_dep.get_variable('systemdsystemunitdir'),
+ )
endif
install_data(
- 'gbmc-enqueue-powercycle.sh',
- install_dir: get_option('bindir'),
- install_mode: 'rwxr-xr-x'
+ 'gbmc-enqueue-powercycle.sh',
+ install_dir: get_option('bindir'),
+ install_mode: 'rwxr-xr-x',
)
diff --git a/meson.options b/meson.options
index 1a53aa5..726b99e 100644
--- a/meson.options
+++ b/meson.options
@@ -1,4 +1,19 @@
option('tests', type: 'feature', description: 'Build tests')
-option('static-bifurcation', type: 'string', value: '/usr/share/google-ipmi-sys/bifurcation.json', description: 'Path to Static Bifurcation Json config')
-option('bare_metal', type: 'boolean', value: false, description: 'Bare Metal Mode Flag')
-option('bm-signal-path', type: 'string', value: '/run/bm-ready.flag', description: 'Path to the flag to indicate that BM mode is ready')
+option(
+ 'static-bifurcation',
+ type: 'string',
+ value: '/usr/share/google-ipmi-sys/bifurcation.json',
+ description: 'Path to Static Bifurcation Json config',
+)
+option(
+ 'bare_metal',
+ type: 'boolean',
+ value: false,
+ description: 'Bare Metal Mode Flag',
+)
+option(
+ 'bm-signal-path',
+ type: 'string',
+ value: '/run/bm-ready.flag',
+ description: 'Path to the flag to indicate that BM mode is ready',
+)
diff --git a/test/meson.build b/test/meson.build
index 061b352..9a6308a 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -1,46 +1,53 @@
-gtest = dependency('gtest', main: true, disabler: true, required: get_option('tests'))
+gtest = dependency(
+ 'gtest',
+ main: true,
+ disabler: true,
+ required: get_option('tests'),
+)
gmock = dependency('gmock', disabler: true, required: get_option('tests'))
tests_pre = declare_dependency(
- dependencies: [sys_dep, gtest, gmock, dependency('stdplus-gtest')])
+ dependencies: [sys_dep, gtest, gmock, dependency('stdplus-gtest')],
+)
tests_lib = static_library(
- 'common',
- 'common.cpp',
- 'helper.cpp',
- implicit_include_directories: false,
- dependencies: tests_pre)
+ 'common',
+ 'common.cpp',
+ 'helper.cpp',
+ implicit_include_directories: false,
+ dependencies: tests_pre,
+)
-tests_dep = declare_dependency(
- link_with: tests_lib,
- dependencies: tests_pre)
+tests_dep = declare_dependency(link_with: tests_lib, dependencies: tests_pre)
tests = [
- 'cable',
- 'cpld',
- 'entity',
- 'eth',
- 'flash',
- 'google_accel_oob',
- 'handler',
- 'machine',
- 'pcie',
- 'poweroff',
- 'psu',
- 'pcie_bifurcation',
- 'bmc_mode',
- 'linux_boot_done',
- 'bm_mode_transition',
- 'bm_instance',
- 'bios_setting',
+ 'cable',
+ 'cpld',
+ 'entity',
+ 'eth',
+ 'flash',
+ 'google_accel_oob',
+ 'handler',
+ 'machine',
+ 'pcie',
+ 'poweroff',
+ 'psu',
+ 'pcie_bifurcation',
+ 'bmc_mode',
+ 'linux_boot_done',
+ 'bm_mode_transition',
+ 'bm_instance',
+ 'bios_setting',
]
foreach t : tests
- test(
- t,
- executable(
- t.underscorify(),
- t + '_unittest.cpp',
- implicit_include_directories: false,
- dependencies: tests_dep))
+ test(
+ t,
+ executable(
+ t.underscorify(),
+ t + '_unittest.cpp',
+ implicit_include_directories: false,
+ dependencies: tests_dep,
+ ),
+ )
endforeach