Update meson formatting
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
Change-Id: Ib05b0978f1bfb576c059a2c2f66b6ad03e10090a
diff --git a/meson.build b/meson.build
index 9293f49..1c42caf 100644
--- a/meson.build
+++ b/meson.build
@@ -1,7 +1,7 @@
project(
'host-error-monitor',
'cpp',
- version : '1.0',
+ version: '1.0',
meson_version: '>=1.1.1',
default_options: [
'b_ndebug=if-release',
@@ -9,32 +9,31 @@
'cpp_std=c++20',
'warning_level=3',
'werror=true',
- ]
+ ],
)
-if(get_option('libpeci').enabled())
- add_project_arguments('-DLIBPECI', language : 'cpp')
+if (get_option('libpeci').enabled())
+ add_project_arguments('-DLIBPECI', language: 'cpp')
endif
-if(get_option('crashdump').enabled())
- add_project_arguments('-DCRASHDUMP', language : 'cpp')
+if (get_option('crashdump').enabled())
+ add_project_arguments('-DCRASHDUMP', language: 'cpp')
endif
-if(get_option('send-to-logger').enabled())
- add_project_arguments('-DSEND_TO_LOGGING_SERVICE', language : 'cpp')
+if (get_option('send-to-logger').enabled())
+ add_project_arguments('-DSEND_TO_LOGGING_SERVICE', language: 'cpp')
endif
sdbusplus = dependency('sdbusplus')
-gpiodcxx = dependency('libgpiodcxx',
- default_options: ['bindings=cxx'],
+gpiodcxx = dependency(
+ 'libgpiodcxx',
+ default_options: ['bindings=cxx'],
)
systemd = dependency('systemd', required: true)
-systemd_system_unit_dir = systemd.get_variable(pkgconfig:
- 'systemdsystemunitdir'
-)
+systemd_system_unit_dir = systemd.get_variable(pkgconfig: 'systemdsystemunitdir')
-boost = dependency('boost', version : '>=1.82.0', required : false, include_type: 'system')
+boost = dependency('boost', version: '>=1.82.0', required: false, include_type: 'system')
if not boost.found()
boost = subproject('boost', required: true).get_variable('boost_dep')
boost = boost.as_system('system')
@@ -47,7 +46,7 @@
'-DBOOST_NO_RTTI',
'-DBOOST_NO_TYPEID',
],
- language : 'cpp'
+ language: 'cpp',
)
phosphor_dbus_interfaces = dependency('phosphor-dbus-interfaces')
@@ -61,7 +60,7 @@
phosphor_dbus_interfaces,
]
-if(get_option('libpeci').enabled())
+if (get_option('libpeci').enabled())
peci = dependency('libpeci')
deps += [
peci,
@@ -76,11 +75,11 @@
include_directories: incs,
dependencies: deps,
install: true,
- install_dir: bindir
+ install_dir: bindir,
)
subdir('service_files')
if get_option('tests').allowed()
- subdir('tests')
-endif
+ subdir('tests')
+endif
\ No newline at end of file
diff --git a/meson.options b/meson.options
index b0982cd..d08fe21 100644
--- a/meson.options
+++ b/meson.options
@@ -23,5 +23,5 @@
'send-to-logger',
type: 'feature',
value: 'disabled',
- description: 'Use D-Bus Logging interface for reporting'
-)
+ description: 'Use D-Bus Logging interface for reporting',
+)
\ No newline at end of file
diff --git a/service_files/meson.build b/service_files/meson.build
index e2df524..92e71e9 100644
--- a/service_files/meson.build
+++ b/service_files/meson.build
@@ -1,4 +1,4 @@
install_data(
'xyz.openbmc_project.HostErrorMonitor.service',
install_dir: systemd_system_unit_dir,
-)
+)
\ No newline at end of file
diff --git a/tests/meson.build b/tests/meson.build
index f4f7900..545c988 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -8,31 +8,34 @@
dependency('threads'),
gtest_proj.dependency('gtest'),
gtest_proj.dependency('gtest_main'),
- ]
+ ],
)
gmock_dep = gtest_proj.dependency('gmock')
- else
+ else
assert(
not get_option('tests').enabled(),
- 'Googletest is required if tests are enabled'
+ 'Googletest is required if tests are enabled',
)
- endif
+ endif
endif
-unit_tests = [
-]
+unit_tests = []
if get_option('tests').enabled()
# generate the test executable
foreach unit_test : unit_tests
- test(unit_test, executable(
+ test(
unit_test,
- unit_test + '.cpp',
- include_directories: incs,
- dependencies: deps + [
- gtest_dep,
- gmock_dep,
- ])
+ executable(
+ unit_test,
+ unit_test + '.cpp',
+ include_directories: incs,
+ dependencies: deps
+ + [
+ gtest_dep,
+ gmock_dep,
+ ],
+ ),
)
endforeach
-endif
+endif
\ No newline at end of file