From 1f8a5a8d4a88577825d77e5d6d1e39f45c2ca9a3 Mon Sep 17 00:00:00 2001 From: DownerCase Date: Wed, 9 Apr 2025 14:27:14 +0100 Subject: [PATCH 01/12] 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 | 9 +++++++++ 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, 33 insertions(+), 6 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 5e06ba8ccf..b016953f12 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -86,6 +86,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 dc47fd5344..b24628437c 100644 --- a/.github/workflows/build-ubuntu.yml +++ b/.github/workflows/build-ubuntu.yml @@ -132,6 +132,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 55b9c42b50..e06f985bee 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -104,6 +104,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 2c401a82e1..43c33a1c63 100644 --- a/.gitmodules +++ b/.gitmodules @@ -55,3 +55,6 @@ [submodule "thirdparty/tsl-robin-map/tsl-robin-map"] path = thirdparty/tsl-robin-map/tsl-robin-map url = https://github.com/Tessil/robin-map.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 64d3360ed8..a0bc345296 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -635,6 +635,7 @@ message(STATUS "ECAL_BUILD_TESTS : ${ECAL_BUI message(STATUS "ECAL_INSTALL_SAMPLE_SOURCES : ${ECAL_INSTALL_SAMPLE_SOURCES}") message(STATUS "ECAL_USE_NPCAP : ${ECAL_USE_NPCAP}") message(STATUS "ECAL_THIRDPARTY_BUILD_ASIO : ${ECAL_THIRDPARTY_BUILD_ASIO}") +message(STATUS "ECAL_THIRDPARTY_BUILD_ABSL : ${ECAL_THIRDPARTY_BUILD_ABSL}") message(STATUS "ECAL_THIRDPARTY_BUILD_CMAKE_FUNCTIONS : ${ECAL_THIRDPARTY_BUILD_CMAKE_FUNCTIONS}") message(STATUS "ECAL_THIRDPARTY_BUILD_CURL : ${ECAL_THIRDPARTY_BUILD_CURL}") message(STATUS "ECAL_THIRDPARTY_BUILD_FINEFTP : ${ECAL_THIRDPARTY_BUILD_FINEFTP}") diff --git a/NOTICE.md b/NOTICE.md index 84fbc809a8..b779372f20 100644 --- a/NOTICE.md +++ b/NOTICE.md @@ -295,6 +295,15 @@ yaml-cpp - Binary distributions for Windows - Binary distributions for Linux +abseil + - License: Apache 2.0 + - Project: https://github.com/abseil/abseil-cpp + - Copyright: 2017 The Abseil Authors. + - Included in: + - Git submodule `/thirdparty/absl/absl` + - Binary distributions for Windows + - Binary distributions for Linux + ## Cryptography Content may contain encryption software. The country in which you are currently diff --git a/cmake/submodule_dependencies.cmake b/cmake/submodule_dependencies.cmake index c96caa62ab..2cd61e92e7 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 @@ -72,4 +73,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 d87ed075ed094a4dcdf6bc0367b8dc376e0fd20e Mon Sep 17 00:00:00 2001 From: DownerCase Date: Wed, 9 Apr 2025 14:27:42 +0100 Subject: [PATCH 02/12] Enforce project wide c++ standard --- CMakeLists.txt | 44 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a0bc345296..ec632b6751 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -274,19 +274,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 205d99b038e9d326dc1aeaf07355a249b5429c27 Mon Sep 17 00:00:00 2001 From: DownerCase Date: Wed, 9 Apr 2025 14:28:14 +0100 Subject: [PATCH 03/12] 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 17903ee274fb9e1f8a22deafe61697932a410f1f Mon Sep 17 00:00:00 2001 From: DownerCase Date: Wed, 9 Apr 2025 14:28:47 +0100 Subject: [PATCH 04/12] 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 a09074936e..5ac583575b 100644 --- a/cpack/innosetup/ecal_setup.iss.in +++ b/cpack/innosetup/ecal_setup.iss.in @@ -115,7 +115,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 @@ -123,7 +122,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 6d25181cea6447c4649c01577aca475b58fc758a Mon Sep 17 00:00:00 2001 From: DownerCase Date: Wed, 9 Apr 2025 14:59:04 +0100 Subject: [PATCH 05/12] 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 f6a39688e4a0d9ced70aa7a054cc004a1ba56631 Mon Sep 17 00:00:00 2001 From: DownerCase Date: Wed, 9 Apr 2025 15:34:03 +0100 Subject: [PATCH 06/12] FTXUI requires C++17 --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ec632b6751..987e82000a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -298,10 +298,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 15442908c6ab5646ee1a815b0a745fd884dbf8f1 Mon Sep 17 00:00:00 2001 From: DownerCase Date: Wed, 9 Apr 2025 15:35:28 +0100 Subject: [PATCH 07/12] 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 42c13115bb8b4ca083fc2529e3d3af5b23c48586 Mon Sep 17 00:00:00 2001 From: DownerCase Date: Thu, 10 Apr 2025 14:04:35 +0100 Subject: [PATCH 08/12] 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 52cd6a5dbe0a52c18de5c47572d2573f2ad95725 Mon Sep 17 00:00:00 2001 From: DownerCase Date: Thu, 10 Apr 2025 14:04:53 +0100 Subject: [PATCH 09/12] 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 e06f985bee..0cbaf19f25 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 dcc95090451a03d1fad8865b311f540ee54d2092 Mon Sep 17 00:00:00 2001 From: DownerCase Date: Thu, 10 Apr 2025 17:49:53 +0100 Subject: [PATCH 10/12] 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 88a4033c9ec0de122bb250d89de0626892fc765f Mon Sep 17 00:00:00 2001 From: DownerCase Date: Thu, 10 Apr 2025 18:31:31 +0100 Subject: [PATCH 11/12] 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 1222c795c25c1716a0b99173e58f2ca956a65d61 Mon Sep 17 00:00:00 2001 From: DownerCase Date: Sat, 7 Jun 2025 12:08:56 +0100 Subject: [PATCH 12/12] 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