From b8918343cd33613c34c3148719d83d98734e6206 Mon Sep 17 00:00:00 2001 From: DownerCase Date: Wed, 9 Apr 2025 14:27:14 +0100 Subject: [PATCH 01/17] Update protobuf to 5.29.4 and add abseil --- .github/workflows/build-macos.yml | 1 + .github/workflows/build-ubuntu.yml | 1 + .github/workflows/build-windows.yml | 1 + .gitmodules | 3 +++ CMakeLists.txt | 1 + NOTICE.md | 2 +- cmake/submodule_dependencies.cmake | 3 ++- thirdparty/absl/absl | 1 + thirdparty/absl/build-absl.cmake | 4 ++++ thirdparty/protobuf/build-protobuf.cmake | 13 +++++++++---- thirdparty/protobuf/protobuf | 2 +- 11 files changed, 25 insertions(+), 7 deletions(-) create mode 160000 thirdparty/absl/absl create mode 100644 thirdparty/absl/build-absl.cmake diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 4f126b9633..44b70d2811 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -92,6 +92,7 @@ jobs: -DECAL_USE_NPCAP=OFF \ -DECAL_THIRDPARTY_BUILD_CMAKE_FUNCTIONS=ON \ -DECAL_THIRDPARTY_BUILD_PROTOBUF=OFF \ + -DECAL_THIRDPARTY_BUILD_ABSL=OFF \ -DECAL_THIRDPARTY_BUILD_SPDLOG=ON \ -DECAL_THIRDPARTY_BUILD_TINYXML2=ON \ -DECAL_THIRDPARTY_BUILD_FINEFTP=ON \ diff --git a/.github/workflows/build-ubuntu.yml b/.github/workflows/build-ubuntu.yml index 2ff926509b..3fef3b9f65 100644 --- a/.github/workflows/build-ubuntu.yml +++ b/.github/workflows/build-ubuntu.yml @@ -135,6 +135,7 @@ jobs: -DECAL_INSTALL_SAMPLE_SOURCES=ON \ -DECAL_THIRDPARTY_BUILD_CMAKE_FUNCTIONS=ON \ -DECAL_THIRDPARTY_BUILD_PROTOBUF=OFF \ + -DECAL_THIRDPARTY_BUILD_ABSL=OFF \ -DECAL_THIRDPARTY_BUILD_SPDLOG=ON \ -DECAL_THIRDPARTY_BUILD_TINYXML2=ON \ -DECAL_THIRDPARTY_BUILD_FINEFTP=ON \ diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 56a5d18e24..f1da20ec72 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -103,6 +103,7 @@ jobs: -DECAL_USE_NPCAP=ON ^ -DECAL_THIRDPARTY_BUILD_CMAKE_FUNCTIONS=ON ^ -DECAL_THIRDPARTY_BUILD_PROTOBUF=ON ^ + -DECAL_THIRDPARTY_BUILD_ABSL=ON ^ -DECAL_THIRDPARTY_BUILD_SPDLOG=ON ^ -DECAL_THIRDPARTY_BUILD_TINYXML2=ON ^ -DECAL_THIRDPARTY_BUILD_FINEFTP=OFF ^ diff --git a/.gitmodules b/.gitmodules index 1a0ab957a3..9f3a8aed7f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -61,3 +61,6 @@ [submodule "thirdparty/protozero/protozero"] path = thirdparty/protozero/protozero url = https://github.com/mapbox/protozero.git +[submodule "thirdparty/absl"] + path = thirdparty/absl/absl + url = https://github.com/abseil/abseil-cpp.git diff --git a/CMakeLists.txt b/CMakeLists.txt index c4a58807e7..3dbc9f9c6f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -644,6 +644,7 @@ message(STATUS "ECAL_BUILD_TESTS : ${ECAL_BUI message(STATUS "ECAL_DEPLOY_DEPENDENCIES : ${ECAL_DEPLOY_DEPENDENCIES}") message(STATUS "ECAL_INSTALL_SAMPLE_SOURCES : ${ECAL_INSTALL_SAMPLE_SOURCES}") message(STATUS "ECAL_USE_NPCAP : ${ECAL_USE_NPCAP}") +message(STATUS "ECAL_THIRDPARTY_BUILD_ABSL : ${ECAL_THIRDPARTY_BUILD_ABSL}") message(STATUS "ECAL_THIRDPARTY_BUILD_ASIO : ${ECAL_THIRDPARTY_BUILD_ASIO}") message(STATUS "ECAL_THIRDPARTY_BUILD_BENCHMARK : ${ECAL_THIRDPARTY_BUILD_BENCHMARK}") message(STATUS "ECAL_THIRDPARTY_BUILD_CMAKE_FUNCTIONS : ${ECAL_THIRDPARTY_BUILD_CMAKE_FUNCTIONS}") diff --git a/NOTICE.md b/NOTICE.md index 601d5777db..8818aa435f 100644 --- a/NOTICE.md +++ b/NOTICE.md @@ -356,4 +356,4 @@ eCAL makes use of the following external components: - Git Submodule `/thirdparty/yaml-cpp/yaml-cpp` - Windows builds - Linux builds - - Python wheels \ No newline at end of file + - Python wheels diff --git a/cmake/submodule_dependencies.cmake b/cmake/submodule_dependencies.cmake index 622a81b21c..30eb22ea4c 100644 --- a/cmake/submodule_dependencies.cmake +++ b/cmake/submodule_dependencies.cmake @@ -4,6 +4,7 @@ cmake_minimum_required(VERSION 3.24) set(ecal_submodule_dependency_provider_root_dir ${CMAKE_CURRENT_LIST_DIR}) set(ecal_submodule_dependencies + absl asio CMakeFunctions CURL @@ -74,4 +75,4 @@ endmacro() cmake_language( SET_DEPENDENCY_PROVIDER ecal_dependencies_provider SUPPORTED_METHODS FIND_PACKAGE -) \ No newline at end of file +) diff --git a/thirdparty/absl/absl b/thirdparty/absl/absl new file mode 160000 index 0000000000..d9e4955c65 --- /dev/null +++ b/thirdparty/absl/absl @@ -0,0 +1 @@ +Subproject commit d9e4955c65cd4367dd6bf46f4ccb8cd3d100540b diff --git a/thirdparty/absl/build-absl.cmake b/thirdparty/absl/build-absl.cmake new file mode 100644 index 0000000000..72b577e1c9 --- /dev/null +++ b/thirdparty/absl/build-absl.cmake @@ -0,0 +1,4 @@ +include_guard(GLOBAL) + +set(ABSL_ENABLE_INSTALL "ON") +add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/absl" thirdparty/absl SYSTEM) diff --git a/thirdparty/protobuf/build-protobuf.cmake b/thirdparty/protobuf/build-protobuf.cmake index 051470d838..6aed5416e1 100644 --- a/thirdparty/protobuf/build-protobuf.cmake +++ b/thirdparty/protobuf/build-protobuf.cmake @@ -1,7 +1,10 @@ +# Protobuf 4(.25.X) is skipped because of a regression with msvc that never +# had its fix backported. +# https://github.com/protocolbuffers/protobuf/issues/14602 set(Protobuf_PROTOC_EXECUTABLE protoc) -set(Protobuf_VERSION 3.11.4) -set(Protobuf_VERSION_MAJOR 3) -set(Protobuf_VERSION_MINOR 11) +set(Protobuf_VERSION 5.29.4) +set(Protobuf_VERSION_MAJOR 5) +set(Protobuf_VERSION_MINOR 29) set(Protobuf_VERSION_PATCH 4) include_guard(GLOBAL) @@ -12,6 +15,8 @@ if(UNIX) set(protobuf_BUILD_SHARED_LIBS ON CACHE BOOL "My option" FORCE) endif() +set(protobuf_ABSL_PROVIDER "package") + if(MSVC) message(STATUS "supress thirdparty warnings for windows platform ..") set(CMAKE_CXX_FLAGS_OLD "${CMAKE_CXX_FLAGS}") @@ -25,7 +30,7 @@ endif() ecal_disable_all_warnings() ecal_variable_push(CMAKE_POLICY_VERSION_MINIMUM) set(CMAKE_POLICY_VERSION_MINIMUM 3.5) -add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/protobuf/cmake" "${eCAL_BINARY_DIR}/thirdparty/protobuf" SYSTEM) +add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/protobuf" "${eCAL_BINARY_DIR}/thirdparty/protobuf" SYSTEM) ecal_variable_pop(CMAKE_POLICY_VERSION_MINIMUM) ecal_restore_warning_level() diff --git a/thirdparty/protobuf/protobuf b/thirdparty/protobuf/protobuf index d0bfd52211..1be1c9d0ea 160000 --- a/thirdparty/protobuf/protobuf +++ b/thirdparty/protobuf/protobuf @@ -1 +1 @@ -Subproject commit d0bfd5221182da1a7cc280f3337b5e41a89539cf +Subproject commit 1be1c9d0ea6efa2a25bd7b76186844d1669be78a From e86d57e691458f49ca847fb5147da8db6528b834 Mon Sep 17 00:00:00 2001 From: DownerCase Date: Wed, 9 Apr 2025 14:27:42 +0100 Subject: [PATCH 02/17] Enforce project wide c++ standard --- CMakeLists.txt | 44 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3dbc9f9c6f..329072b988 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -283,19 +283,43 @@ file(TO_CMAKE_PATH "${CMAKE_PREFIX_PATH}" CMAKE_PREFIX_PATH) message(STATUS "Module Path: ${CMAKE_MODULE_PATH}") message(STATUS "Prefix Path: ${CMAKE_PREFIX_PATH}") -# -------------------------------------------------------- -# detect qt library -# -------------------------------------------------------- -if(MSVC) - if (ECAL_USE_QT) - find_package(QT NAMES Qt6 Qt5 COMPONENTS Core QUIET) - if (NOT "${QT_FOUND}") - include("cmake/qt_msvc_path.cmake") - autodetect_qt_msvc_dir() - endif() +# ------- +# Select C++ standard +# Abseil requires everything to be built with a consistent C++ standard. +# If abseil is built with C++14 but a component building with C++17 tries to use +# abseil (eg: via protobuf) there will be a mismatch and possibly a build failure. +# This is most prevalent with string_view where C++14 will use the abseil type +# but C++17 use std::string_view +# ------- + +# C++14 is the baseline required standard +set(_ECAL_CXX_STD 14) + +# Some dependencies require C++17, which we must detect and push to everything +if(ECAL_USE_QT) + find_package(QT NAMES Qt6 Qt5 COMPONENTS Core QUIET) + if(MSVC AND NOT "${QT_FOUND}") + include("cmake/qt_msvc_path.cmake") + autodetect_qt_msvc_dir() + endif() + if("${QT_VERSION_MAJOR}" VERSION_GREATER 5) + # QT6 has C++17 usage requirements + set(_ECAL_CXX_STD 17) endif() endif() +if("${CMAKE_SOURCE_DIR}" STREQUAL "${eCAL_SOURCE_DIR}" AND NOT DEFINED CMAKE_CXX_STANDARD) + # eCAL is being compiled as the root project, and no standard version is set + set(CMAKE_CXX_STANDARD "${_ECAL_CXX_STD}") +else() + # eCAL is part of a larger build or the standard was externally set +endif() + +set(CMAKE_CXX_STANDARD_REQUIRED ON) +if("${CMAKE_CXX_STANDARD}" VERSION_LESS "${_ECAL_CXX_STD}") + message(FATAL_ERROR "eCAL requires CMAKE_CXX_STANDARD to be at least ${_ECAL_CXX_STD} (got: ${CMAKE_CXX_STANDARD})") +endif() + find_package(CMakeFunctions REQUIRED) git_revision_information(DEFAULT ${ECAL_BUILD_VERSION}) From 4054925f4958e947bef1689fa871696b1a171cad Mon Sep 17 00:00:00 2001 From: DownerCase Date: Wed, 9 Apr 2025 14:28:14 +0100 Subject: [PATCH 03/17] Avoid target name collision with abseil --- app/util/config/CMakeLists.txt | 2 +- ecal/samples/cpp/misc/time/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/util/config/CMakeLists.txt b/app/util/config/CMakeLists.txt index 175743666e..b6fd16f5c5 100644 --- a/app/util/config/CMakeLists.txt +++ b/app/util/config/CMakeLists.txt @@ -16,7 +16,7 @@ # # ========================= eCAL LICENSE ================================= -project(config) +project(ecal_config) set(ecalconfig_src src/ecal_config.cpp diff --git a/ecal/samples/cpp/misc/time/CMakeLists.txt b/ecal/samples/cpp/misc/time/CMakeLists.txt index fe9115cf1c..5b663a0cd0 100644 --- a/ecal/samples/cpp/misc/time/CMakeLists.txt +++ b/ecal/samples/cpp/misc/time/CMakeLists.txt @@ -18,7 +18,7 @@ cmake_minimum_required(VERSION 3.15) -project(time) +project(ecal_time) find_package(eCAL REQUIRED) From edf1f0bcde2b3040dd4d10fa1b037df13a7b0945 Mon Sep 17 00:00:00 2001 From: DownerCase Date: Wed, 9 Apr 2025 14:28:47 +0100 Subject: [PATCH 04/17] Remove subsumed protobof-protos target from innosetup --- cpack/innosetup/ecal_setup.iss.in | 2 -- 1 file changed, 2 deletions(-) diff --git a/cpack/innosetup/ecal_setup.iss.in b/cpack/innosetup/ecal_setup.iss.in index ebed534d93..91cc454a7f 100644 --- a/cpack/innosetup/ecal_setup.iss.in +++ b/cpack/innosetup/ecal_setup.iss.in @@ -117,7 +117,6 @@ Source: "{#ComponentStagingDir}\libprotobuf-lite\*"; DestDir: "{app}"; Source: "{#ComponentStagingDir}\libprotoc\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\protobuf Source: "{#ComponentStagingDir}\protobuf-export\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\protobuf Source: "{#ComponentStagingDir}\protobuf-headers\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\protobuf -Source: "{#ComponentStagingDir}\protobuf-protos\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\protobuf Source: "{#ComponentStagingDir}\protoc\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\protobuf Source: "{#DebugSdkStagingDir}\libprotobuf\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\protobuf @@ -125,7 +124,6 @@ Source: "{#DebugSdkStagingDir}\libprotobuf-lite\*"; DestDir: "{app}"; Source: "{#DebugSdkStagingDir}\libprotoc\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\protobuf Source: "{#DebugSdkStagingDir}\protobuf-export\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\protobuf ;Source: "{#DebugSdkStagingDir}\protobuf-headers\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\protobuf -;Source: "{#DebugSdkStagingDir}\protobuf-protos\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\protobuf ; Source: "{#DebugSdkStagingDir}\protoc\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: sdk\protobuf ; sdk\hdf5 From c4dc46e503bf71a59cb24d9da475e1df9e94079b Mon Sep 17 00:00:00 2001 From: DownerCase Date: Wed, 9 Apr 2025 14:59:04 +0100 Subject: [PATCH 05/17] Walk back some samples to C++14 --- ecal/samples/cpp/benchmarks/perftool/CMakeLists.txt | 2 +- .../protobuf/samples/pubsub/person_receive/CMakeLists.txt | 2 +- .../protobuf/samples/pubsub/proto_dyn_json_rec/CMakeLists.txt | 2 +- .../protobuf/samples/pubsub/proto_dyn_rec/CMakeLists.txt | 2 +- serialization/protobuf/tests/pubsub_proto_test/CMakeLists.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ecal/samples/cpp/benchmarks/perftool/CMakeLists.txt b/ecal/samples/cpp/benchmarks/perftool/CMakeLists.txt index c5c04de48f..1c2922ac8f 100644 --- a/ecal/samples/cpp/benchmarks/perftool/CMakeLists.txt +++ b/ecal/samples/cpp/benchmarks/perftool/CMakeLists.txt @@ -43,7 +43,7 @@ target_link_libraries(${PROJECT_NAME} PRIVATE target_include_directories(${PROJECT_NAME} PRIVATE src) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) source_group(TREE "${CMAKE_CURRENT_LIST_DIR}" FILES diff --git a/serialization/protobuf/samples/pubsub/person_receive/CMakeLists.txt b/serialization/protobuf/samples/pubsub/person_receive/CMakeLists.txt index 43f5846f26..8379de654e 100644 --- a/serialization/protobuf/samples/pubsub/person_receive/CMakeLists.txt +++ b/serialization/protobuf/samples/pubsub/person_receive/CMakeLists.txt @@ -40,7 +40,7 @@ target_link_libraries(${PROJECT_NAME} eCAL::protobuf_core ) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) ecal_install_sample(${PROJECT_NAME}) diff --git a/serialization/protobuf/samples/pubsub/proto_dyn_json_rec/CMakeLists.txt b/serialization/protobuf/samples/pubsub/proto_dyn_json_rec/CMakeLists.txt index e25331ced8..0de12b7f6b 100644 --- a/serialization/protobuf/samples/pubsub/proto_dyn_json_rec/CMakeLists.txt +++ b/serialization/protobuf/samples/pubsub/proto_dyn_json_rec/CMakeLists.txt @@ -34,7 +34,7 @@ target_link_libraries(${PROJECT_NAME} eCAL::protobuf_core ) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) ecal_install_sample(${PROJECT_NAME}) diff --git a/serialization/protobuf/samples/pubsub/proto_dyn_rec/CMakeLists.txt b/serialization/protobuf/samples/pubsub/proto_dyn_rec/CMakeLists.txt index ebb3e321d0..bf3b8511a2 100644 --- a/serialization/protobuf/samples/pubsub/proto_dyn_rec/CMakeLists.txt +++ b/serialization/protobuf/samples/pubsub/proto_dyn_rec/CMakeLists.txt @@ -36,7 +36,7 @@ target_link_libraries(${PROJECT_NAME} eCAL::protobuf_core ) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) ecal_install_sample(${PROJECT_NAME}) diff --git a/serialization/protobuf/tests/pubsub_proto_test/CMakeLists.txt b/serialization/protobuf/tests/pubsub_proto_test/CMakeLists.txt index fbc3f81aae..266839f112 100644 --- a/serialization/protobuf/tests/pubsub_proto_test/CMakeLists.txt +++ b/serialization/protobuf/tests/pubsub_proto_test/CMakeLists.txt @@ -47,7 +47,7 @@ target_link_libraries(${PROJECT_NAME} ) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) ecal_install_gtest(${PROJECT_NAME}) From 42496d0ad612a0846bcff84b98de46c125fe136f Mon Sep 17 00:00:00 2001 From: DownerCase Date: Wed, 9 Apr 2025 15:34:03 +0100 Subject: [PATCH 06/17] FTXUI requires C++17 --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 329072b988..5973d497c9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -307,10 +307,15 @@ if(ECAL_USE_QT) set(_ECAL_CXX_STD 17) endif() endif() +if(ECAL_USE_FTXUI) + # FTXUI requires C++17 + set(_ECAL_CXX_STD 17) +endif() if("${CMAKE_SOURCE_DIR}" STREQUAL "${eCAL_SOURCE_DIR}" AND NOT DEFINED CMAKE_CXX_STANDARD) # eCAL is being compiled as the root project, and no standard version is set set(CMAKE_CXX_STANDARD "${_ECAL_CXX_STD}") + message(STATUS "eCAL is using C++ ${_ECAL_CXX_STD}") else() # eCAL is part of a larger build or the standard was externally set endif() From ffe1be0aad243fe4584ed07741c73a773a9da8f7 Mon Sep 17 00:00:00 2001 From: DownerCase Date: Wed, 9 Apr 2025 15:35:28 +0100 Subject: [PATCH 07/17] Drop some executables erroneously requiring C++17 down to C++14 --- app/mon/mon_cli/CMakeLists.txt | 2 +- app/mon/mon_plugins/protobuf_reflection/CMakeLists.txt | 2 +- app/mon/mon_plugins/signals_plotting/CMakeLists.txt | 2 +- app/mon/mon_tui/CMakeLists.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/mon/mon_cli/CMakeLists.txt b/app/mon/mon_cli/CMakeLists.txt index f4923bdf0e..82bfd21abc 100644 --- a/app/mon/mon_cli/CMakeLists.txt +++ b/app/mon/mon_cli/CMakeLists.txt @@ -46,7 +46,7 @@ target_link_libraries(${PROJECT_NAME} PRIVATE eCAL::protobuf_core eCAL::string_core eCAL::core_pb) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) ecal_install_app(${PROJECT_NAME}) diff --git a/app/mon/mon_plugins/protobuf_reflection/CMakeLists.txt b/app/mon/mon_plugins/protobuf_reflection/CMakeLists.txt index 36614267a3..7026b2a0eb 100644 --- a/app/mon/mon_plugins/protobuf_reflection/CMakeLists.txt +++ b/app/mon/mon_plugins/protobuf_reflection/CMakeLists.txt @@ -69,7 +69,7 @@ target_link_libraries (${PROJECT_NAME} PRIVATE MonitorTreeView eCAL::mon_plugin_lib ) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) if(MSVC) set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/wd4127 /wd4714") diff --git a/app/mon/mon_plugins/signals_plotting/CMakeLists.txt b/app/mon/mon_plugins/signals_plotting/CMakeLists.txt index 6d6f0f0c96..fc574dc212 100644 --- a/app/mon/mon_plugins/signals_plotting/CMakeLists.txt +++ b/app/mon/mon_plugins/signals_plotting/CMakeLists.txt @@ -84,7 +84,7 @@ target_link_libraries (${PROJECT_NAME} PRIVATE CustomQt ) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) if(MSVC) set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/wd4127 /wd4714" ) diff --git a/app/mon/mon_tui/CMakeLists.txt b/app/mon/mon_tui/CMakeLists.txt index 24208ac2a3..0818de5a2b 100644 --- a/app/mon/mon_tui/CMakeLists.txt +++ b/app/mon/mon_tui/CMakeLists.txt @@ -125,7 +125,7 @@ target_link_libraries(${PROJECT_NAME} PRIVATE ftxui::dom ftxui::component) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) ecal_install_app(${PROJECT_NAME}) From be7c68b22fa22c0cd4c42491490fa019a5e82599 Mon Sep 17 00:00:00 2001 From: DownerCase Date: Thu, 10 Apr 2025 14:04:35 +0100 Subject: [PATCH 08/17] Disable UPB --- thirdparty/protobuf/build-protobuf.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/thirdparty/protobuf/build-protobuf.cmake b/thirdparty/protobuf/build-protobuf.cmake index 6aed5416e1..94afb4021b 100644 --- a/thirdparty/protobuf/build-protobuf.cmake +++ b/thirdparty/protobuf/build-protobuf.cmake @@ -15,6 +15,8 @@ if(UNIX) set(protobuf_BUILD_SHARED_LIBS ON CACHE BOOL "My option" FORCE) endif() +set(protobuf_BUILD_LIBUPB OFF CACHE BOOL "libupb is disabled" FORCE) +set(protobuf_USE_EXTERNAL_GTEST ON CACHE BOOL "Do not use protobuf vendored gtest" FORCE) set(protobuf_ABSL_PROVIDER "package") if(MSVC) From f92ef0b4f326b5bb46d9431764e843832ad0ef02 Mon Sep 17 00:00:00 2001 From: DownerCase Date: Thu, 10 Apr 2025 14:04:53 +0100 Subject: [PATCH 09/17] Add Windows integration test --- .github/workflows/build-windows.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index f1da20ec72..22d944cd06 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -166,6 +166,17 @@ jobs: run: cmake --build . --config Debug working-directory: ${{ runner.workspace }}/_build/sdk + - name: SDK Integration test + run: | + cmake --install "${{ runner.workspace }}/_build/sdk" --prefix "${{ runner.workspace }}/_install/sdk" --config Debug + cmake -G "Visual Studio 16 2019" -A x64 -T v142 ^ + -S serialization/protobuf/samples/pubsub/person_loopback ^ + -B _integration_test_build ^ + -DCMAKE_CONFIGURATION_TYPES="Debug" ^ + -DCMAKE_PREFIX_PATH="${{ runner.workspace }}/_install/sdk" + cmake --build _integration_test_build --config Debug + shell: cmd + - name: Build Release run: cmake --build . --config Release working-directory: ${{ runner.workspace }}/_build/complete From 04d81c04bd1f90c3b369ab753bf514051a92ee2a Mon Sep 17 00:00:00 2001 From: DownerCase Date: Thu, 10 Apr 2025 17:49:53 +0100 Subject: [PATCH 10/17] Fixup build-absl.cmake --- thirdparty/absl/build-absl.cmake | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/thirdparty/absl/build-absl.cmake b/thirdparty/absl/build-absl.cmake index 72b577e1c9..a24161c58c 100644 --- a/thirdparty/absl/build-absl.cmake +++ b/thirdparty/absl/build-absl.cmake @@ -1,4 +1,9 @@ include_guard(GLOBAL) -set(ABSL_ENABLE_INSTALL "ON") -add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/absl" thirdparty/absl SYSTEM) +# Copied out of protobuf/cmake/abseil-cpp.cmake +if(protobuf_INSTALL) + # When protobuf_INSTALL is enabled and Abseil will be built as a module, + # Abseil will be installed along with protobuf for convenience. + set(ABSL_ENABLE_INSTALL ON) +endif() +add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/absl" "${eCAL_BINARY_DIR}thirdparty/absl" SYSTEM) From bc12eb54cb44845cacf018e5e8543304e5d341ce Mon Sep 17 00:00:00 2001 From: DownerCase Date: Thu, 10 Apr 2025 18:31:31 +0100 Subject: [PATCH 11/17] Remove CMake policy guard around protobuf --- thirdparty/protobuf/build-protobuf.cmake | 3 --- 1 file changed, 3 deletions(-) diff --git a/thirdparty/protobuf/build-protobuf.cmake b/thirdparty/protobuf/build-protobuf.cmake index 94afb4021b..08c058b237 100644 --- a/thirdparty/protobuf/build-protobuf.cmake +++ b/thirdparty/protobuf/build-protobuf.cmake @@ -30,10 +30,7 @@ if(MSVC) endif() ecal_disable_all_warnings() -ecal_variable_push(CMAKE_POLICY_VERSION_MINIMUM) -set(CMAKE_POLICY_VERSION_MINIMUM 3.5) add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/protobuf" "${eCAL_BINARY_DIR}/thirdparty/protobuf" SYSTEM) -ecal_variable_pop(CMAKE_POLICY_VERSION_MINIMUM) ecal_restore_warning_level() if (NOT TARGET protobuf::libprotobuf) From 46a7056676b359bad6809c6cf809cbcaf27d8534 Mon Sep 17 00:00:00 2001 From: DownerCase Date: Sat, 7 Jun 2025 12:08:56 +0100 Subject: [PATCH 12/17] Bump protobuf to 5.29.5 --- thirdparty/protobuf/build-protobuf.cmake | 4 ++-- thirdparty/protobuf/protobuf | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/thirdparty/protobuf/build-protobuf.cmake b/thirdparty/protobuf/build-protobuf.cmake index 08c058b237..eaa420f9d2 100644 --- a/thirdparty/protobuf/build-protobuf.cmake +++ b/thirdparty/protobuf/build-protobuf.cmake @@ -2,10 +2,10 @@ # had its fix backported. # https://github.com/protocolbuffers/protobuf/issues/14602 set(Protobuf_PROTOC_EXECUTABLE protoc) -set(Protobuf_VERSION 5.29.4) +set(Protobuf_VERSION 5.29.5) set(Protobuf_VERSION_MAJOR 5) set(Protobuf_VERSION_MINOR 29) -set(Protobuf_VERSION_PATCH 4) +set(Protobuf_VERSION_PATCH 5) include_guard(GLOBAL) diff --git a/thirdparty/protobuf/protobuf b/thirdparty/protobuf/protobuf index 1be1c9d0ea..f5de0a0495 160000 --- a/thirdparty/protobuf/protobuf +++ b/thirdparty/protobuf/protobuf @@ -1 +1 @@ -Subproject commit 1be1c9d0ea6efa2a25bd7b76186844d1669be78a +Subproject commit f5de0a0495faa63b4186fc767324f8b9a7bf4fc4 From 4422f7258b17e19a0845d715273e69ca662f1924 Mon Sep 17 00:00:00 2001 From: DownerCase Date: Sat, 24 Jan 2026 10:54:10 +0000 Subject: [PATCH 13/17] Add sbom.py --- thirdparty/absl/sbom.py | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 thirdparty/absl/sbom.py diff --git a/thirdparty/absl/sbom.py b/thirdparty/absl/sbom.py new file mode 100644 index 0000000000..402f840abd --- /dev/null +++ b/thirdparty/absl/sbom.py @@ -0,0 +1,32 @@ +import sys +import os + +sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), "..")) # Add ecal_license_utils to path +import ecal_license_utils + +def get_sbom(): + component_name = "abseil" + component_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), "absl") + + sbom = {} + sbom[component_name] = {} + sbom[component_name]["include_type"] = [ + ecal_license_utils.include_type.SUBMODULE, + ecal_license_utils.include_type.WINDOWS_BUILDS, + ecal_license_utils.include_type.LINUX_BUILDS, + ecal_license_utils.include_type.PYTHON_BINDINGS, + ] + sbom[component_name]["path"] = component_dir + sbom[component_name]["license"] = "Apache-2.0" + sbom[component_name]["license_files"] = [ + os.path.join(sbom[component_name]["path"], "LICENSE"), + ] + sbom[component_name]["thirdparty_license_files"] = [] + sbom[component_name]["copyright"] = ecal_license_utils.get_copyright_from_file(sbom[component_name]["license_files"][0]) + sbom[component_name]["homepage"] = "https://abseil.io/" + sbom[component_name]["repo_url"] = ecal_license_utils.get_repo_url_from_submodule(component_dir) + sbom[component_name]["git_version"] = ecal_license_utils.get_git_version_from_submodule(component_dir) + sbom[component_name]["git_version_url"] = sbom[component_name]["repo_url"] + "/tree/" + sbom[component_name]["git_version"] + + return sbom + From 5d1548d5e6a665cda9a68796257fafe8164a5212 Mon Sep 17 00:00:00 2001 From: DownerCase Date: Sat, 24 Jan 2026 11:35:17 +0000 Subject: [PATCH 14/17] ci[windows]: Fix SDK integration test --- .github/workflows/build-windows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 22d944cd06..f7a5b58323 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -169,7 +169,7 @@ jobs: - name: SDK Integration test run: | cmake --install "${{ runner.workspace }}/_build/sdk" --prefix "${{ runner.workspace }}/_install/sdk" --config Debug - cmake -G "Visual Studio 16 2019" -A x64 -T v142 ^ + cmake -G "Ninja" ^ -S serialization/protobuf/samples/pubsub/person_loopback ^ -B _integration_test_build ^ -DCMAKE_CONFIGURATION_TYPES="Debug" ^ @@ -591,4 +591,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: ${{ env.ARTIFACT_NAME }} - path: ${{ runner.workspace }}/_build/complete/_deploy/${{ env.ASSET_NAME }} \ No newline at end of file + path: ${{ runner.workspace }}/_build/complete/_deploy/${{ env.ASSET_NAME }} From ff85fc8f4b7830497868dbaba39994b9da1a762c Mon Sep 17 00:00:00 2001 From: DownerCase Date: Mon, 26 Jan 2026 19:58:34 +0000 Subject: [PATCH 15/17] see what happens in CI if project-wide C++ standard isn't set --- CMakeLists.txt | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5973d497c9..ff86aceb37 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -312,18 +312,18 @@ if(ECAL_USE_FTXUI) set(_ECAL_CXX_STD 17) endif() -if("${CMAKE_SOURCE_DIR}" STREQUAL "${eCAL_SOURCE_DIR}" AND NOT DEFINED CMAKE_CXX_STANDARD) - # eCAL is being compiled as the root project, and no standard version is set - set(CMAKE_CXX_STANDARD "${_ECAL_CXX_STD}") - message(STATUS "eCAL is using C++ ${_ECAL_CXX_STD}") -else() - # eCAL is part of a larger build or the standard was externally set -endif() +# if("${CMAKE_SOURCE_DIR}" STREQUAL "${eCAL_SOURCE_DIR}" AND NOT DEFINED CMAKE_CXX_STANDARD) +# # eCAL is being compiled as the root project, and no standard version is set +# set(CMAKE_CXX_STANDARD "${_ECAL_CXX_STD}") +# message(STATUS "eCAL is using C++ ${_ECAL_CXX_STD}") +# else() +# # eCAL is part of a larger build or the standard was externally set +# endif() set(CMAKE_CXX_STANDARD_REQUIRED ON) -if("${CMAKE_CXX_STANDARD}" VERSION_LESS "${_ECAL_CXX_STD}") - message(FATAL_ERROR "eCAL requires CMAKE_CXX_STANDARD to be at least ${_ECAL_CXX_STD} (got: ${CMAKE_CXX_STANDARD})") -endif() +# if("${CMAKE_CXX_STANDARD}" VERSION_LESS "${_ECAL_CXX_STD}") +# message(FATAL_ERROR "eCAL requires CMAKE_CXX_STANDARD to be at least ${_ECAL_CXX_STD} (got: ${CMAKE_CXX_STANDARD})") +# endif() find_package(CMakeFunctions REQUIRED) From 9e56e4d4be4909b33ed2d772ea8a577f2624313e Mon Sep 17 00:00:00 2001 From: DownerCase Date: Sat, 21 Feb 2026 11:13:53 +0000 Subject: [PATCH 16/17] Put back CXX_STANDARD requirements --- CMakeLists.txt | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ff86aceb37..1d7fd3d6be 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -293,7 +293,7 @@ message(STATUS "Prefix Path: ${CMAKE_PREFIX_PATH}") # ------- # C++14 is the baseline required standard -set(_ECAL_CXX_STD 14) +set(_ECAL_MIN_REQUIRED_CXX_STD 14) # Some dependencies require C++17, which we must detect and push to everything if(ECAL_USE_QT) @@ -304,26 +304,25 @@ if(ECAL_USE_QT) endif() if("${QT_VERSION_MAJOR}" VERSION_GREATER 5) # QT6 has C++17 usage requirements - set(_ECAL_CXX_STD 17) + set(_ECAL_MIN_REQUIRED_CXX_STD 17) endif() endif() if(ECAL_USE_FTXUI) # FTXUI requires C++17 - set(_ECAL_CXX_STD 17) + set(_ECAL_MIN_REQUIRED_CXX_STD 17) endif() -# if("${CMAKE_SOURCE_DIR}" STREQUAL "${eCAL_SOURCE_DIR}" AND NOT DEFINED CMAKE_CXX_STANDARD) -# # eCAL is being compiled as the root project, and no standard version is set -# set(CMAKE_CXX_STANDARD "${_ECAL_CXX_STD}") -# message(STATUS "eCAL is using C++ ${_ECAL_CXX_STD}") -# else() -# # eCAL is part of a larger build or the standard was externally set -# endif() +if("${CMAKE_SOURCE_DIR}" STREQUAL "${eCAL_SOURCE_DIR}" AND NOT DEFINED CMAKE_CXX_STANDARD) + # eCAL is being compiled as the root project, and no standard version is set + set(CMAKE_CXX_STANDARD "${_ECAL_MIN_REQUIRED_CXX_STD}") + message(STATUS "eCAL is using C++ ${_ECAL_MIN_REQUIRED_CXX_STD}") +else() + # eCAL is part of a larger build or the standard was externally set +endif() -set(CMAKE_CXX_STANDARD_REQUIRED ON) -# if("${CMAKE_CXX_STANDARD}" VERSION_LESS "${_ECAL_CXX_STD}") -# message(FATAL_ERROR "eCAL requires CMAKE_CXX_STANDARD to be at least ${_ECAL_CXX_STD} (got: ${CMAKE_CXX_STANDARD})") -# endif() +if("${CMAKE_CXX_STANDARD}" VERSION_LESS "${_ECAL_MIN_REQUIRED_CXX_STD}") + message(FATAL_ERROR "eCAL requires CMAKE_CXX_STANDARD to be at least ${_ECAL_MIN_REQUIRED_CXX_STD} (got: ${CMAKE_CXX_STANDARD})") +endif() find_package(CMakeFunctions REQUIRED) From 9899966316df2ac5a26e5d5c48847660cc35b846 Mon Sep 17 00:00:00 2001 From: DownerCase Date: Sat, 28 Feb 2026 10:44:48 +0000 Subject: [PATCH 17/17] Bump min C++ version for compiling to 17 C++17 is always required for compiling eCAL core --- CMakeLists.txt | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1d7fd3d6be..6721e9fd2d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -292,25 +292,8 @@ message(STATUS "Prefix Path: ${CMAKE_PREFIX_PATH}") # but C++17 use std::string_view # ------- -# C++14 is the baseline required standard -set(_ECAL_MIN_REQUIRED_CXX_STD 14) - -# Some dependencies require C++17, which we must detect and push to everything -if(ECAL_USE_QT) - find_package(QT NAMES Qt6 Qt5 COMPONENTS Core QUIET) - if(MSVC AND NOT "${QT_FOUND}") - include("cmake/qt_msvc_path.cmake") - autodetect_qt_msvc_dir() - endif() - if("${QT_VERSION_MAJOR}" VERSION_GREATER 5) - # QT6 has C++17 usage requirements - set(_ECAL_MIN_REQUIRED_CXX_STD 17) - endif() -endif() -if(ECAL_USE_FTXUI) - # FTXUI requires C++17 - set(_ECAL_MIN_REQUIRED_CXX_STD 17) -endif() +# C++17 is the baseline required standard for compiling +set(_ECAL_MIN_REQUIRED_CXX_STD 17) if("${CMAKE_SOURCE_DIR}" STREQUAL "${eCAL_SOURCE_DIR}" AND NOT DEFINED CMAKE_CXX_STANDARD) # eCAL is being compiled as the root project, and no standard version is set @@ -324,6 +307,9 @@ if("${CMAKE_CXX_STANDARD}" VERSION_LESS "${_ECAL_MIN_REQUIRED_CXX_STD}") message(FATAL_ERROR "eCAL requires CMAKE_CXX_STANDARD to be at least ${_ECAL_MIN_REQUIRED_CXX_STD} (got: ${CMAKE_CXX_STANDARD})") endif() +# The requested C++ standard is mandatory +set(CMAKE_CXX_STANDARD_REQUIRED ON) + find_package(CMakeFunctions REQUIRED) git_revision_information(DEFAULT ${ECAL_BUILD_VERSION})