Skip to content

Commit aa0a712

Browse files
ktflkrcal
authored andcommitted
Make it compile with C++20 and protobuf 29.x
1 parent 2078278 commit aa0a712

4 files changed

Lines changed: 9 additions & 6 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,6 @@
3333

3434
# Debugging
3535
.gdb_history
36+
37+
# IDE integration
38+
compile_commands.json

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ message(STATUS "Install directory = ${CMAKE_INSTALL_PREFIX}")
2929

3030
#
3131
#--- FLAGS ---------------------------------------------------------------------------
32-
set(CMAKE_CXX_STANDARD 17)
32+
set(CMAKE_CXX_STANDARD 20)
3333
set(CMAKE_CXX_STANDARD_REQUIRED True)
3434
set(CMAKE_CXX_EXTENSIONS OFF)
3535

36-
set(CMAKE_CXX_FLAGS "-Wall -Wextra")
36+
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-error=null-dereference")
3737
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -fno-inline -fno-omit-frame-pointer -fmax-errors=10")
3838
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -ffast-math -DNDEBUG -fno-omit-frame-pointer")
3939
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -ffast-math -DNDEBUG")
@@ -111,7 +111,7 @@ list(REMOVE_DUPLICATES Boost_COMPONENTS)
111111
find_package(Boost ${FairMQ_Boost_VERSION} REQUIRED COMPONENTS ${Boost_COMPONENTS})
112112

113113
find_package(ppconsul REQUIRED)
114-
find_package(Protobuf REQUIRED)
114+
find_package(Protobuf CONFIG REQUIRED)
115115
find_package(gRPC CONFIG REQUIRED)
116116

117117
find_package(AliceO2 REQUIRED)

src/common/SubTimeFrameFileWriter.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ namespace impl {
8080
const auto lHdrCnt = sizeof(sInfoData) / sizeof(SidecarInfoData);
8181

8282
for (std::size_t i = 0; i < lHdrCnt; i++) {
83-
fmt::format_to(fmt::appender(lHeader), sInfoData[i].mHdrFmt, sInfoData[i].mHdr);
83+
fmt::format_to(fmt::appender(lHeader), fmt::runtime(sInfoData[i].mHdrFmt), sInfoData[i].mHdr);
8484
fmt::format_to(fmt::appender(lHeader), "{}", (i < lHdrCnt - 1) ? " " : "");
8585
}
8686

@@ -90,7 +90,7 @@ namespace impl {
9090
template<class T>
9191
static void sInfoVal(fmt::memory_buffer &pBuf, const SidecarInfoDataType pType, const T& pVal) {
9292
const auto lHdrCnt = sizeof(sInfoData) / sizeof(SidecarInfoData);
93-
fmt::format_to(fmt::appender(pBuf), sInfoData[pType].mValFmt, pVal);
93+
fmt::format_to(fmt::appender(pBuf), fmt::runtime(sInfoData[pType].mValFmt), pVal);
9494
fmt::format_to(fmt::appender(pBuf), "{}", (pType < lHdrCnt - 1) ? " " : "");
9595
}
9696
}

src/common/base/DataDistLogger.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ class DataDistLogger {
225225

226226
DataDistLogger& operator<<(const char* cstr) {
227227
if (cstr != NULL) {
228-
fmt::format_to(fmt::appender(mLogMessage), cstr);
228+
fmt::format_to(fmt::appender(mLogMessage), fmt::runtime(cstr));
229229
}
230230
return *this;
231231
}

0 commit comments

Comments
 (0)