meson: reformat with meson formatter
Apply the `meson format` results.
Change-Id: I0ff3dc51a6a4e8ea2edf03219e4578fcffe18748
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/meson.build b/meson.build
index 19d783e..bffa7c8 100644
--- a/meson.build
+++ b/meson.build
@@ -14,23 +14,23 @@
cxx = meson.get_compiler('cpp')
add_project_arguments(
- cxx.get_supported_arguments([
- '-DBOOST_ASIO_DISABLE_THREADS',
- '-DBOOST_ALL_NO_LIB',
- '-DBOOST_SYSTEM_NO_DEPRECATED',
- '-DBOOST_ASIO_NO_DEPRECATED',
- '-DBOOST_NO_RTTI',
- '-DBOOST_NO_TYPEID',
- '-Wno-unused-parameter',
- ]),
- language: 'cpp'
+ cxx.get_supported_arguments(
+ [
+ '-DBOOST_ASIO_DISABLE_THREADS',
+ '-DBOOST_ALL_NO_LIB',
+ '-DBOOST_SYSTEM_NO_DEPRECATED',
+ '-DBOOST_ASIO_NO_DEPRECATED',
+ '-DBOOST_NO_RTTI',
+ '-DBOOST_NO_TYPEID',
+ '-Wno-unused-parameter',
+ ],
+ ),
+ language: 'cpp',
)
boost_version = '>=1.79.0'
boost_modules = ['coroutine', 'context']
-boost = dependency('boost',
- version: boost_version,
- modules: boost_modules)
+boost = dependency('boost', version: boost_version, modules: boost_modules)
nlohmann_json_dep = dependency('nlohmann_json', include_type: 'system')
phosphor_logging = dependency('phosphor-logging')
@@ -39,17 +39,14 @@
add_project_arguments(
'-DTELEMETRY_MAX_REPORTS=' + get_option('max-reports').to_string(),
- '-DTELEMETRY_MAX_READING_PARAMS=' +
- get_option('max-reading-parameters').to_string(),
+ '-DTELEMETRY_MAX_READING_PARAMS=' + get_option('max-reading-parameters').to_string(),
'-DTELEMETRY_MIN_INTERVAL=' + get_option('min-interval').to_string(),
'-DTELEMETRY_MAX_TRIGGERS=' + get_option('max-triggers').to_string(),
- '-DTELEMETRY_MAX_DBUS_PATH_LENGTH=' +
- get_option('max-dbus-path-length').to_string(),
- '-DTELEMETRY_MAX_APPEND_LIMIT=' +
- get_option('max-append-limit').to_string(),
+ '-DTELEMETRY_MAX_DBUS_PATH_LENGTH=' + get_option('max-dbus-path-length').to_string(),
+ '-DTELEMETRY_MAX_APPEND_LIMIT=' + get_option('max-append-limit').to_string(),
'-DTELEMETRY_MAX_ID_NAME_LENGTH=' + get_option('max-id-name-length').to_string(),
'-DTELEMETRY_MAX_PREFIX_LENGTH=' + get_option('max-prefix-length').to_string(),
- language: 'cpp'
+ language: 'cpp',
)
executable(
@@ -80,12 +77,7 @@
'src/utils/make_id_name.cpp',
'src/utils/messanger_service.cpp',
],
- dependencies: [
- boost,
- nlohmann_json_dep,
- sdbusplus,
- phosphor_logging,
- ],
+ dependencies: [boost, nlohmann_json_dep, sdbusplus, phosphor_logging],
include_directories: 'src',
install: true,
install_dir: get_option('prefix') / get_option('bindir'),
@@ -120,7 +112,7 @@
'wants': service_wants,
'requires': service_requires,
'before': service_before,
- 'after': service_after
+ 'after': service_after,
},
install: true,
install_dir: systemd.get_variable('systemdsystemunitdir'),
diff --git a/meson.options b/meson.options
index c8a46b8..7e71648 100644
--- a/meson.options
+++ b/meson.options
@@ -1,20 +1,60 @@
option('buildtest', type: 'boolean', value: true, description: 'Build tests')
-option('max-reports', type: 'integer', min: 0, value: 10,
- description: 'Max number of Reports')
-option('max-reading-parameters', type: 'integer', min: 0, value: 200,
- description: 'Max number of metric properties in single report')
-option('min-interval', type: 'integer', min: 1, value: 1000,
- description: 'Minimal value of interval in milliseconds')
-option('max-triggers', type: 'integer', min: 0, value: 10,
- description: 'Max number of Triggers')
-option('max-dbus-path-length', type: 'integer', min: 256, value: 4095,
- description: 'Max length of dbus object path')
-option('max-append-limit', type: 'integer', min: 0, value: 256,
- description: 'Max AppendLimit value')
-option('max-id-name-length', type: 'integer', min: 32, value: 256,
- description: 'Max length of any "id" or "name" type field.')
-option('max-prefix-length', type: 'integer', min: 32, value: 256,
- description: 'Max length of dbus prefix for any object.')
+option(
+ 'max-reports',
+ type: 'integer',
+ min: 0,
+ value: 10,
+ description: 'Max number of Reports',
+)
+option(
+ 'max-reading-parameters',
+ type: 'integer',
+ min: 0,
+ value: 200,
+ description: 'Max number of metric properties in single report',
+)
+option(
+ 'min-interval',
+ type: 'integer',
+ min: 1,
+ value: 1000,
+ description: 'Minimal value of interval in milliseconds',
+)
+option(
+ 'max-triggers',
+ type: 'integer',
+ min: 0,
+ value: 10,
+ description: 'Max number of Triggers',
+)
+option(
+ 'max-dbus-path-length',
+ type: 'integer',
+ min: 256,
+ value: 4095,
+ description: 'Max length of dbus object path',
+)
+option(
+ 'max-append-limit',
+ type: 'integer',
+ min: 0,
+ value: 256,
+ description: 'Max AppendLimit value',
+)
+option(
+ 'max-id-name-length',
+ type: 'integer',
+ min: 32,
+ value: 256,
+ description: 'Max length of any "id" or "name" type field.',
+)
+option(
+ 'max-prefix-length',
+ type: 'integer',
+ min: 32,
+ value: 256,
+ description: 'Max length of dbus prefix for any object.',
+)
option('service-wants', type: 'array', value: [])
option('service-requires', type: 'array', value: [])
option('service-before', type: 'array', value: [])
diff --git a/subprojects/packagefiles/boost/meson.build b/subprojects/packagefiles/boost/meson.build
index dab33f3..3ab24cd 100644
--- a/subprojects/packagefiles/boost/meson.build
+++ b/subprojects/packagefiles/boost/meson.build
@@ -1,29 +1,29 @@
-project('boost', 'cpp',
- version: '1.80.0',
- meson_version: '>=0.56.0')
+project('boost', 'cpp', version: '1.80.0', meson_version: '>=0.56.0')
cxx = meson.get_compiler('cpp')
build_dir = join_paths(meson.current_source_dir(), 'build')
-r = run_command('[','!','-d', build_dir, ']', check: false)
+r = run_command('[', '!', '-d', build_dir, ']', check: false)
if r.returncode() == 0
- r = run_command('./bootstrap.sh', '--with-libraries=coroutine', check: true)
- r = run_command('./b2', 'install','--prefix=build', check: true)
+ r = run_command('./bootstrap.sh', '--with-libraries=coroutine', check: true)
+ r = run_command('./b2', 'install', '--prefix=build', check: true)
endif
include_dir = join_paths('build', 'include')
lib_dir = join_paths(meson.current_source_dir(), 'build', 'lib')
custom_dep = declare_dependency(
- link_args: ['-L' + lib_dir, '-Wl,-rpath-link,' + lib_dir])
+ link_args: ['-L' + lib_dir, '-Wl,-rpath-link,' + lib_dir],
+)
-boost_inc = include_directories(include_dir, is_system:true)
+boost_inc = include_directories(include_dir, is_system: true)
boost_dep = declare_dependency(
- include_directories: boost_inc,
- dependencies: [
- cxx.find_library('boost_context', dirs: lib_dir, static: true),
- cxx.find_library('boost_coroutine', dirs: lib_dir, static: true),
- custom_dep
- ])
+ include_directories: boost_inc,
+ dependencies: [
+ cxx.find_library('boost_context', dirs: lib_dir, static: true),
+ cxx.find_library('boost_coroutine', dirs: lib_dir, static: true),
+ custom_dep,
+ ],
+)
meson.override_dependency('boost', boost_dep)
diff --git a/tests/meson.build b/tests/meson.build
index 4dc883f..0717c7f 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -1,4 +1,9 @@
-gtest_dep = dependency('gtest', main: false, required: false, version: '>=1.11.0')
+gtest_dep = dependency(
+ 'gtest',
+ main: false,
+ required: false,
+ version: '>=1.11.0',
+)
gmock_dep = dependency('gmock', required: false, version: '>=1.11.0')
if not gtest_dep.found() or not gmock_dep.found()
gtest_proj = import('cmake').subproject('googletest')
@@ -69,7 +74,7 @@
sdbusplus,
],
include_directories: ['../src', 'src'],
- cpp_args: '-fno-lto'
+ cpp_args: '-fno-lto',
),
timeout: 120,
)