Fix CI build issues
Update to latest .clang-format
Update to C++23 which is required for some dependencies which requires
meson >1.1.1
Change-Id: I45ee122e2e95595ae78462d32e16da288fb67008
Signed-off-by: Jason M. Bills <jason.m.bills@intel.com>
diff --git a/.clang-format b/.clang-format
index d43e884..e5530e6 100644
--- a/.clang-format
+++ b/.clang-format
@@ -17,9 +17,7 @@
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: true
AllowShortLoopsOnASingleLine: false
-AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
-AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: true
BinPackParameters: true
BitFieldColonSpacing: None
@@ -43,12 +41,14 @@
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakAfterAttributes: Never
+BreakAfterReturnType: Automatic
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: AfterColon
BreakInheritanceList: AfterColon
BreakStringLiterals: false
+BreakTemplateDeclarations: Yes
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
@@ -87,7 +87,7 @@
IndentWrappedFunctionNames: true
InsertNewlineAtEOF: true
KeepEmptyLinesAtTheStartOfBlocks: false
-LambdaBodyIndentation: OuterScope
+LambdaBodyIndentation: Signature
LineEnding: LF
MacroBlockBegin: ''
MacroBlockEnd: ''
@@ -98,13 +98,14 @@
ObjCSpaceBeforeProtocolList: true
PackConstructorInitializers: BinPack
PenaltyBreakAssignment: 25
-PenaltyBreakBeforeFirstCallParameter: 19
+PenaltyBreakBeforeFirstCallParameter: 50
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
+PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
-PenaltyReturnTypeOnItsOwnLine: 60
-PenaltyIndentedWhitespace: 0
+PenaltyReturnTypeOnItsOwnLine: 150
+PenaltyIndentedWhitespace: 1
PointerAlignment: Left
QualifierAlignment: Left
ReferenceAlignment: Left
diff --git a/include/meson.build b/include/meson.build
index 5930fe2..55b8c0a 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -1,3 +1,3 @@
if get_option('phosphor-u-boot-env-mgrd').allowed()
install_headers('u-boot-env-mgr.hpp')
-endif
\ No newline at end of file
+endif
diff --git a/meson.build b/meson.build
index 18f4f42..948958d 100644
--- a/meson.build
+++ b/meson.build
@@ -4,35 +4,41 @@
default_options: [
'warning_level=3',
'werror=true',
- 'cpp_std=c++20' #highly suspect there should be more entries tied to line 4-6 of CMakeLists.txt.old
+ 'cpp_std=c++23', #highly suspect there should be more entries tied to line 4-6 of CMakeLists.txt.old
],
license: 'Apache-2.0',
version: '0.1',
- meson_version: '>=0.64.0',
+ meson_version: '>=1.1.1',
)
-add_project_arguments('-Wno-psabi', #no idea what this line is about or where it came from
+add_project_arguments(
+ '-Wno-psabi', #no idea what this line is about or where it came from
'-DBOOST_ERROR_CODE_HEADER_ONLY',
'-DBOOST_SYSTEM_NO_DEPRECATED',
'-DBOOST_ALL_NO_LIB',
'-DBOOST_NO_RTTI',
'-DBOOST_NO_TYPEID',
'-DBOOST_ASIO_DISABLE_THREADS',
- language: 'cpp')
+ language: 'cpp',
+)
-boost = dependency('boost', version: '>=1.75.0', include_type: 'system', required : true)
-sdbusplus = dependency('sdbusplus', include_type: 'system', required : true)
-dbusinterface = dependency('phosphor-dbus-interfaces', include_type: 'system', required : true)
-phosphor_logging_dep = dependency('phosphor-logging', required : true)
+boost = dependency(
+ 'boost',
+ version: '>=1.75.0',
+ include_type: 'system',
+ required: true,
+)
+sdbusplus = dependency('sdbusplus', include_type: 'system', required: true)
+dbusinterface = dependency(
+ 'phosphor-dbus-interfaces',
+ include_type: 'system',
+ required: true,
+)
+phosphor_logging_dep = dependency('phosphor-logging', required: true)
-default_deps =[
- boost,
- phosphor_logging_dep,
- sdbusplus,
- dbusinterface,
- ]
-
+default_deps = [boost, phosphor_logging_dep, sdbusplus, dbusinterface]
+
incdir = include_directories('include')
subdir('src')
subdir('include')
-subdir('service_files')
\ No newline at end of file
+subdir('service_files')
diff --git a/service_files/meson.build b/service_files/meson.build
index b8d0dcb..cb1c30b 100644
--- a/service_files/meson.build
+++ b/service_files/meson.build
@@ -5,7 +5,10 @@
)
unit_files = [
- ['phosphor-u-boot-env-mgrd', 'xyz.openbmc_project.U_Boot.Environment.Manager.service'],
+ [
+ 'phosphor-u-boot-env-mgrd',
+ 'xyz.openbmc_project.U_Boot.Environment.Manager.service',
+ ],
]
fs = import('fs')
@@ -17,4 +20,4 @@
install_dir: systemd_system_unit_dir,
)
endif
-endforeach
\ No newline at end of file
+endforeach
diff --git a/src/meson.build b/src/meson.build
index b1541f8..4cbda2a 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,10 +1,10 @@
-if get_option('phosphor-u-boot-env-mgrd').allowed()
- executable(
- 'phosphor-u-boot-env-mgr',
- 'u-boot-env-mgr.cpp',
- 'mainapp.cpp',
- include_directories : incdir,
- dependencies: default_deps,
- install: true,
- )
-endif
\ No newline at end of file
+if get_option('phosphor-u-boot-env-mgrd').allowed()
+ executable(
+ 'phosphor-u-boot-env-mgr',
+ 'u-boot-env-mgr.cpp',
+ 'mainapp.cpp',
+ include_directories: incdir,
+ dependencies: default_deps,
+ install: true,
+ )
+endif
diff --git a/src/u-boot-env-mgr.cpp b/src/u-boot-env-mgr.cpp
index aba8c56..75f4ece 100644
--- a/src/u-boot-env-mgr.cpp
+++ b/src/u-boot-env-mgr.cpp
@@ -76,8 +76,8 @@
iface->register_method(
"Write", [this](const std::string& key, const std::string& value) {
- writeVariable(key, value);
- });
+ writeVariable(key, value);
+ });
iface->initialize(true);
}