meson: reformat with meson formatter
Apply the `meson format` results.
Change-Id: Ia403525f2ceab5047e8292c86d1bc9bb3b464e25
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/meson.build b/meson.build
index ffe9c73..beddf1c 100644
--- a/meson.build
+++ b/meson.build
@@ -1,11 +1,15 @@
-project('phosphor-time-manager',
- 'cpp',
- version: '0.1',
- meson_version: '>=1.1.1',
- default_options: [ 'warning_level=3',
- 'werror=true',
- 'cpp_std=c++23',
- 'buildtype=debugoptimized' ])
+project(
+ 'phosphor-time-manager',
+ 'cpp',
+ version: '0.1',
+ meson_version: '>=1.1.1',
+ default_options: [
+ 'warning_level=3',
+ 'werror=true',
+ 'cpp_std=c++23',
+ 'buildtype=debugoptimized',
+ ],
+)
########################################################################
@@ -15,7 +19,7 @@
project_url = 'https://github.com/openbmc/' + project_pretty_name
project_issues_url = project_url + '/issues/new'
-summary('Issue', project_issues_url, section : 'Report Issues')
+summary('Issue', project_issues_url, section: 'Report Issues')
#####################################################################
@@ -27,14 +31,10 @@
# Find the dependencies
-sdbusplus_dep = dependency ('sdbusplus')
-phosphor_logging_dep = dependency ('phosphor-logging')
-phosphor_dbus_interfaces_dep = dependency ('phosphor-dbus-interfaces')
-deps = [
- sdbusplus_dep,
- phosphor_logging_dep,
- phosphor_dbus_interfaces_dep,
-]
+sdbusplus_dep = dependency('sdbusplus')
+phosphor_logging_dep = dependency('phosphor-logging')
+phosphor_dbus_interfaces_dep = dependency('phosphor-dbus-interfaces')
+deps = [sdbusplus_dep, phosphor_logging_dep, phosphor_dbus_interfaces_dep]
###########################################################################
@@ -42,7 +42,10 @@
conf_data = configuration_data()
conf_data.set('DEFAULT_TIME_MODE', get_option('default_time_mode'))
-conf_data.set_quoted('DEFAULT_TIME_SYNC_OBJECT_PATH', get_option('default_time_sync_object_path'))
+conf_data.set_quoted(
+ 'DEFAULT_TIME_SYNC_OBJECT_PATH',
+ get_option('default_time_sync_object_path'),
+)
configure_file(output: 'config.h', configuration: conf_data)
@@ -52,38 +55,45 @@
# Gather sources for the target binaries
phosphor_time_manager_sources = [
- 'bmc_epoch.cpp',
- 'manager.cpp',
- 'utils.cpp',
- 'settings.cpp',
- ]
+ 'bmc_epoch.cpp',
+ 'manager.cpp',
+ 'utils.cpp',
+ 'settings.cpp',
+]
-libtimemanager = static_library('libtimemanager',
- phosphor_time_manager_sources,
- dependencies : deps)
+libtimemanager = static_library(
+ 'libtimemanager',
+ phosphor_time_manager_sources,
+ dependencies: deps,
+)
############################################################################
# Install the files into the build directory
-systemd = dependency ('systemd')
+systemd = dependency('systemd')
systemd_system_unit_dir = systemd.get_variable(
'systemdsystemunitdir',
- pkgconfig_define: ['prefix', get_option('prefix')])
+ pkgconfig_define: ['prefix', get_option('prefix')],
+)
filesystem = import('fs')
-filesystem.copyfile('xyz.openbmc_project.Time.Manager.service',
- install: true,
- install_dir: systemd_system_unit_dir)
+filesystem.copyfile(
+ 'xyz.openbmc_project.Time.Manager.service',
+ install: true,
+ install_dir: systemd_system_unit_dir,
+)
#############################################################################
# Build binaries
-executable('phosphor-time-manager',
- 'main.cpp',
- link_with : libtimemanager,
- dependencies : deps,
- install : true)
+executable(
+ 'phosphor-time-manager',
+ 'main.cpp',
+ link_with: libtimemanager,
+ dependencies: deps,
+ install: true,
+)
if get_option('tests').allowed()
subdir('test')
diff --git a/meson.options b/meson.options
index 2c99b02..dc94285 100644
--- a/meson.options
+++ b/meson.options
@@ -2,10 +2,12 @@
# command : meson configure -Dfeature_name=enabled
-option( 'tests', type : 'feature',
- value: 'enabled',
- description: 'Build unit tests'
- )
+option(
+ 'tests',
+ type: 'feature',
+ value: 'enabled',
+ description: 'Build unit tests',
+)
# Commandline variables list
# Value can be assigned from commandline to below variables
@@ -14,14 +16,17 @@
# Ex: meson configure -Ddefault_time_mode=Mode::Manual
-option ( 'default_time_mode', type : 'combo',
- choices: ['Mode::Manual', 'Mode::NTP'],
- value : 'Mode::Manual',
- description : 'The default time mode')
+option(
+ 'default_time_mode',
+ type: 'combo',
+ choices: ['Mode::Manual', 'Mode::NTP'],
+ value: 'Mode::Manual',
+ description: 'The default time mode',
+)
option(
'default_time_sync_object_path',
type: 'string',
value: '/xyz/openbmc_project/time/sync_method',
- description: 'Default object path for time sync setting'
+ description: 'Default object path for time sync setting',
)
diff --git a/test/meson.build b/test/meson.build
index e43a27b..d33febb 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -1,27 +1,35 @@
#################################################################################
# Enforce the test dependencies when tests are enabled
-gtest = dependency('gtest', main: true, disabler: true,required : get_option('tests'))
-gmock = dependency('gmock',required : get_option('tests'))
+gtest = dependency(
+ 'gtest',
+ main: true,
+ disabler: true,
+ required: get_option('tests'),
+)
+gmock = dependency('gmock', required: get_option('tests'))
##################################################################################
# declare the test sources
test_list = [
- 'TestBmcEpoch.cpp',
- 'TestManager.cpp',
- 'TestUtils.cpp',
- 'mocked_property_change_listener.hpp',
+ 'TestBmcEpoch.cpp',
+ 'TestManager.cpp',
+ 'TestUtils.cpp',
+ 'mocked_property_change_listener.hpp',
]
###################################################################################
# Run the tests
-foreach tests:test_list
- test_name = tests.split('.')[0]
- test(test_name,
- executable(test_name,tests,
- include_directories : ['.','../'],
- link_with : libtimemanager,
- dependencies : [ gtest,
- gmock,
- ] + deps))
+foreach tests : test_list
+ test_name = tests.split('.')[0]
+ test(
+ test_name,
+ executable(
+ test_name,
+ tests,
+ include_directories: ['.', '../'],
+ link_with: libtimemanager,
+ dependencies: [gtest, gmock] + deps,
+ ),
+ )
endforeach