meson: reformat with meson formatter
Apply the `meson format` results.
Change-Id: I0931eb90e92b905028109030d225123a822597df
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/meson.build b/meson.build
index 1a99644..75264f3 100644
--- a/meson.build
+++ b/meson.build
@@ -1,26 +1,24 @@
project(
- 'smbios-mdr',
- 'cpp',
- version: '0.1',
- meson_version: '>=1.1.1',
- default_options: [
- 'cpp_std=c++23',
- 'warning_level=3',
- 'werror=true',
- 'cpp_rtti=false'
- ])
+ 'smbios-mdr',
+ 'cpp',
+ version: '0.1',
+ meson_version: '>=1.1.1',
+ default_options: [
+ 'cpp_std=c++23',
+ 'warning_level=3',
+ 'werror=true',
+ 'cpp_rtti=false',
+ ],
+)
-boost_args = [
- '-DBOOST_ALL_NO_LIB',
- '-DBOOST_ASIO_DISABLE_THREADS',
-]
+boost_args = ['-DBOOST_ALL_NO_LIB', '-DBOOST_ASIO_DISABLE_THREADS']
root_inc = include_directories('include')
boost_dep = dependency('boost')
sdbusplus_dep = dependency('sdbusplus')
-phosphor_dbus_interfaces_dep= dependency('phosphor-dbus-interfaces')
+phosphor_dbus_interfaces_dep = dependency('phosphor-dbus-interfaces')
phosphor_logging_dep = dependency('phosphor-logging')
subdir('src')
diff --git a/meson.options b/meson.options
index 1c33165..935670d 100644
--- a/meson.options
+++ b/meson.options
@@ -1,48 +1,43 @@
+option('tests', type: 'feature', value: 'disabled', description: 'Build tests')
+
option(
- 'tests',
- type: 'feature',
- value: 'disabled',
- description: 'Build tests'
+ 'dimm-dbus',
+ type: 'feature',
+ value: 'enabled',
+ description: 'Expose DIMM D-Bus Interface',
)
option(
- 'dimm-dbus',
- type: 'feature',
- value: 'enabled',
- description: 'Expose DIMM D-Bus Interface'
+ 'dimm-only-locator',
+ type: 'feature',
+ value: 'disabled',
+ description: 'Only use the DIMM number, and not the bank',
)
option(
- 'dimm-only-locator',
- type: 'feature',
- value: 'disabled',
- description: 'Only use the DIMM number, and not the bank'
+ 'assoc-trim-path',
+ type: 'feature',
+ value: 'disabled',
+ description: 'Trim one object path component from CPU and DIMM associations',
)
option(
- 'assoc-trim-path',
- type: 'feature',
- value: 'disabled',
- description: 'Trim one object path component from CPU and DIMM associations'
+ 'cpuinfo',
+ type: 'feature',
+ value: 'enabled',
+ description: 'Build CPUInfo service',
)
option(
- 'cpuinfo',
- type: 'feature',
- value: 'enabled',
- description: 'Build CPUInfo service'
+ 'cpuinfo-peci',
+ type: 'feature',
+ value: 'enabled',
+ description: 'Enable CPUInfo features that depend on PECI',
)
option(
- 'cpuinfo-peci',
- type: 'feature',
- value: 'enabled',
- description: 'Enable CPUInfo features that depend on PECI'
-)
-
-option(
- 'smbios-ipmi-blob',
- type: 'feature',
- value: 'enabled',
- description: 'Build IPMI blob library for SMBIOS transfer'
+ 'smbios-ipmi-blob',
+ type: 'feature',
+ value: 'enabled',
+ description: 'Build IPMI blob library for SMBIOS transfer',
)
diff --git a/service_files/meson.build b/service_files/meson.build
index 30a59a9..4c420d7 100644
--- a/service_files/meson.build
+++ b/service_files/meson.build
@@ -1,17 +1,17 @@
# Map of unit file to meson option which controls whether file gets installed
unit_files = [
- ['smbios-mdrv2.service', ''],
- ['xyz.openbmc_project.cpuinfo.service', 'cpuinfo'],
+ ['smbios-mdrv2.service', ''],
+ ['xyz.openbmc_project.cpuinfo.service', 'cpuinfo'],
]
systemd_dep = dependency('systemd')
systemd_system_unitdir = systemd_dep.get_variable(
- 'systemd_system_unit_dir',
- pkgconfig_define: ['rootprefix', get_option('prefix')]
- )
+ 'systemd_system_unit_dir',
+ pkgconfig_define: ['rootprefix', get_option('prefix')],
+)
foreach u : unit_files
- if u[1] == '' or get_option(u[1]).allowed()
- install_data(u[0], install_dir: systemd_system_unitdir)
- endif
+ if u[1] == '' or get_option(u[1]).allowed()
+ install_data(u[0], install_dir: systemd_system_unitdir)
+ endif
endforeach
diff --git a/src/meson.build b/src/meson.build
index 229842f..18d858d 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,70 +1,70 @@
cpp_args_smbios = boost_args
if get_option('dimm-dbus').allowed()
- cpp_args_smbios += ['-DDIMM_DBUS']
+ cpp_args_smbios += ['-DDIMM_DBUS']
endif
if get_option('assoc-trim-path').allowed()
- cpp_args_smbios += ['-DASSOC_TRIM_PATH']
+ cpp_args_smbios += ['-DASSOC_TRIM_PATH']
endif
if get_option('dimm-only-locator').allowed()
- cpp_args_smbios += ['-DDIMM_ONLY_LOCATOR']
+ cpp_args_smbios += ['-DDIMM_ONLY_LOCATOR']
endif
executable(
- 'smbiosmdrv2app',
- 'mdrv2.cpp',
- 'mdrv2_main.cpp',
- 'cpu.cpp',
- 'dimm.cpp',
- 'system.cpp',
- 'pcieslot.cpp',
- cpp_args: cpp_args_smbios,
- dependencies: [
- boost_dep,
- sdbusplus_dep,
- phosphor_logging_dep,
- phosphor_dbus_interfaces_dep,
- ],
- implicit_include_directories: false,
- include_directories: root_inc,
- install: true,
-)
-
-if get_option('cpuinfo').allowed()
- cpp = meson.get_compiler('cpp')
- # i2c-tools provides no pkgconfig so we need to find it manually
- i2c_dep = cpp.find_library('i2c')
-
- peci_dep = []
- peci_flag = []
- peci_files = []
- if get_option('cpuinfo-peci').allowed()
- peci_flag = '-DPECI_ENABLED=1'
- peci_dep = dependency('libpeci')
- peci_files = ['speed_select.cpp', 'sst_mailbox.cpp']
- endif
-
- executable(
- 'cpuinfoapp',
- 'cpuinfo_main.cpp',
- 'cpuinfo_utils.cpp',
- peci_files,
- cpp_args: boost_args + peci_flag,
+ 'smbiosmdrv2app',
+ 'mdrv2.cpp',
+ 'mdrv2_main.cpp',
+ 'cpu.cpp',
+ 'dimm.cpp',
+ 'system.cpp',
+ 'pcieslot.cpp',
+ cpp_args: cpp_args_smbios,
dependencies: [
- boost_dep,
- sdbusplus_dep,
- phosphor_logging_dep,
- phosphor_dbus_interfaces_dep,
- i2c_dep,
- peci_dep,
+ boost_dep,
+ sdbusplus_dep,
+ phosphor_logging_dep,
+ phosphor_dbus_interfaces_dep,
],
implicit_include_directories: false,
include_directories: root_inc,
install: true,
- )
+)
+
+if get_option('cpuinfo').allowed()
+ cpp = meson.get_compiler('cpp')
+ # i2c-tools provides no pkgconfig so we need to find it manually
+ i2c_dep = cpp.find_library('i2c')
+
+ peci_dep = []
+ peci_flag = []
+ peci_files = []
+ if get_option('cpuinfo-peci').allowed()
+ peci_flag = '-DPECI_ENABLED=1'
+ peci_dep = dependency('libpeci')
+ peci_files = ['speed_select.cpp', 'sst_mailbox.cpp']
+ endif
+
+ executable(
+ 'cpuinfoapp',
+ 'cpuinfo_main.cpp',
+ 'cpuinfo_utils.cpp',
+ peci_files,
+ cpp_args: boost_args + peci_flag,
+ dependencies: [
+ boost_dep,
+ sdbusplus_dep,
+ phosphor_logging_dep,
+ phosphor_dbus_interfaces_dep,
+ i2c_dep,
+ peci_dep,
+ ],
+ implicit_include_directories: false,
+ include_directories: root_inc,
+ install: true,
+ )
endif
if get_option('smbios-ipmi-blob').allowed()
- subdir('smbios-ipmi-blobs')
+ subdir('smbios-ipmi-blobs')
endif
diff --git a/src/smbios-ipmi-blobs/meson.build b/src/smbios-ipmi-blobs/meson.build
index 62d1d4f..4906bb0 100644
--- a/src/smbios-ipmi-blobs/meson.build
+++ b/src/smbios-ipmi-blobs/meson.build
@@ -4,18 +4,15 @@
smbiosstore_common_deps = [ipmi_blob_dep, libipmid_dep, sdbusplus_dep]
shared_module(
- 'smbiosstore',
- 'main.cpp',
- 'handler.cpp',
- dependencies: [
- smbiosstore_common_deps,
- phosphor_logging_dep,
- ],
- include_directories: root_inc,
- install: true,
- install_dir: get_option('libdir') / 'blob-ipmid'
- )
+ 'smbiosstore',
+ 'main.cpp',
+ 'handler.cpp',
+ dependencies: [smbiosstore_common_deps, phosphor_logging_dep],
+ include_directories: root_inc,
+ install: true,
+ install_dir: get_option('libdir') / 'blob-ipmid',
+)
if get_option('tests').allowed()
- subdir('test')
+ subdir('test')
endif
diff --git a/src/smbios-ipmi-blobs/test/meson.build b/src/smbios-ipmi-blobs/test/meson.build
index 6e2c28e..e4e2828 100644
--- a/src/smbios-ipmi-blobs/test/meson.build
+++ b/src/smbios-ipmi-blobs/test/meson.build
@@ -2,26 +2,22 @@
gmock = dependency('gmock')
tests = [
- 'handler_unittest',
- 'handler_open_unittest',
- 'handler_readwrite_unittest',
- 'handler_statclose_unittest',
+ 'handler_unittest',
+ 'handler_open_unittest',
+ 'handler_readwrite_unittest',
+ 'handler_statclose_unittest',
]
foreach t : tests
- test(
- t,
- executable(
- t.underscorify(),
- t + '.cpp',
- '../handler.cpp',
- include_directories: ['../', root_inc],
- dependencies: [
- smbiosstore_common_deps,
- gtest,
- gmock
- ]
- ),
- protocol: 'gtest'
- )
+ test(
+ t,
+ executable(
+ t.underscorify(),
+ t + '.cpp',
+ '../handler.cpp',
+ include_directories: ['../', root_inc],
+ dependencies: [smbiosstore_common_deps, gtest, gmock],
+ ),
+ protocol: 'gtest',
+ )
endforeach
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)