Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
build_type: Release
sanitizer: undefined
cc: gcc
cxx: g++
'Ubuntu 24.04 (Debug, x86_64, Iceoryx)':
image: ubuntu-24.04
# No address sanitizer because of this in test run:
Expand All @@ -39,6 +40,7 @@ jobs:
sanitizer: undefined
iceoryx: on
cc: gcc
cxx: g++
coverage: on
'Ubuntu 24.04 (Debug, x86_64, Iceoryx2)':
image: ubuntu-24.04
Expand All @@ -50,6 +52,7 @@ jobs:
sanitizer: undefined
iceoryx2: on
cc: gcc
cxx: g++
coverage: on
'Ubuntu 24.04 (Release, x86_64)':
image: ubuntu-24.04
Expand All @@ -67,42 +70,50 @@ jobs:
topic_discovery: off
idlc_xtests: off # temporary disabled because of passing -t option to idlc in this test for recursive types
cc: gcc-12
cxx: g++-12
'Ubuntu 24.04 with GCC 12 (Debug, x86_64, no tests)':
image: ubuntu-24.04
cc: gcc-12
cxx: g++-12
testing: off
idlc_xtests: off
'Ubuntu 24.04 with Clang (Debug, x86_64)':
image: ubuntu-24.04
analyzer: on
sanitizer: address,undefined
cc: clang
cxx: clang++
'Ubuntu 24.04 with Clang (Debug, x86_64, no security)':
image: ubuntu-24.04
sanitizer: address,undefined
security: off
cc: clang
cxx: clang++
'Ubuntu 24.04 with Clang (Release, x86_64, no topic discovery)':
image: ubuntu-24.04
build_type: Release
sanitizer: undefined
topic_discovery: off
idlc_xtests: off # temporary disabled because of passing -t option to idlc in this test for recursive types
cc: clang
cxx: clang++
'macOS 14 with Clang (Debug, x86_64)':
image: macos-14
sanitizer: address,undefined
deadline_update_skip: on
cc: clang
cxx: clang++
coverage: on
'macOS 14 with Clang (Release, x86_64)':
image: macos-14
build_type: Release
sanitizer: undefined
cc: clang
cxx: clang++
'macOS 14 with GCC 14 (Debug, analyzer, x86_64)':
image: macos-14
cc: gcc-14
cxx: g++-14
analyzer: on
# 32-bit Windows: without SSL/security because Chocolateley only provides 64-bit OpenSSL
'Windows 2025 with Visual Studio 2022 (Debug, x86, no security)':
Expand Down
1 change: 1 addition & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ if (ENABLE_TOPIC_DISCOVERY)
endif ()

add_subdirectory(helloworld)
add_subdirectory(recorder_and_replayer)
add_subdirectory(roundtrip)
add_subdirectory(throughput)
if (ENABLE_TOPIC_DISCOVERY)
Expand Down
99 changes: 99 additions & 0 deletions examples/recorder_and_replayer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# Copyright(c) 2023 ZettaScale Technology and others
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License v. 2.0 which is available at
# http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
# v. 1.0 which is available at
# http://www.eclipse.org/org/documents/edl-v10.php.
#
# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause

cmake_minimum_required(VERSION 3.16)
project(recorder_replayer LANGUAGES C CXX)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED)
include(FetchContent)

# Prevent subprojects (like mcap_builder) from attempting to find lz4/zstd
set(CMAKE_DISABLE_FIND_PACKAGE_lz4 TRUE)
set(CMAKE_DISABLE_FIND_PACKAGE_zstd TRUE)
set(CMAKE_DISABLE_FIND_PACKAGE_LZ4 TRUE)
set(CMAKE_DISABLE_FIND_PACKAGE_ZSTD TRUE)

set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
FetchContent_Declare(
mcap_builder
GIT_REPOSITORY https://github.com/olympus-robotics/mcap_builder.git
GIT_TAG main
)
FetchContent_MakeAvailable(mcap_builder)

if(NOT TARGET CycloneDDS::ddsc)
find_package(CycloneDDS REQUIRED)
endif()

add_library(dds_topic_descriptor_serde STATIC dds_topic_descriptor_serde.c)
if(TARGET CycloneDDS::ddsc)
# dds_topic_descriptor_serde need dds_stream_countops()
target_include_directories(dds_topic_descriptor_serde
PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/../../src/core/cdr/include")
endif()
target_include_directories(dds_topic_descriptor_serde PUBLIC .)

target_link_libraries(dds_topic_descriptor_serde PRIVATE CycloneDDS::ddsc)

add_executable(recorder dds_recorder.cpp)

if(TARGET CycloneDDS::ddsc)
target_include_directories(recorder
PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/../../src/core/cdr/include"
"${CMAKE_CURRENT_SOURCE_DIR}/../../src/core/ddsi/include")
endif()
target_link_libraries(recorder CycloneDDS::ddsc dds_topic_descriptor_serde mcap)


# add_executable(replayer dds_replayer.cpp)

# if(TARGET CycloneDDS::ddsc)
# target_include_directories(replayer
# PRIVATE
# "${CMAKE_CURRENT_SOURCE_DIR}/../../src/core/cdr/include"
# "${CMAKE_CURRENT_SOURCE_DIR}/../../src/core/ddsi/include")
# endif()
# target_link_libraries(replayer CycloneDDS::ddsc dds_topic_descriptor_serde mcap)

# force to ignore many compile warnings in mcap...
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "AppleClang")
set(disable_flags
"-Wno-documentation"
"-Wno-error=documentation"
"-Wno-sign-conversion"
"-Wno-error=sign-conversion"
"-Wno-implicit-int-conversion"
"-Wno-error=implicit-int-conversion"
)
target_compile_options(mcap PRIVATE ${disable_flags})
target_compile_options(recorder PRIVATE ${disable_flags})
# target_compile_options(replayer PRIVATE ${disable_flags})
endif()

if(MSVC)
target_compile_options(mcap PRIVATE /wd4251 /WX-)
target_compile_options(recorder PRIVATE /wd4251 /WX-)
endif()

if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
if(ANALYZER STREQUAL "on")
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "12")
set(disable_flags
"-Wno-error=analyzer-malloc-leak"
"-Wno-analyzer-malloc-leak"
)
target_compile_options(mcap PRIVATE ${disable_flags})
target_compile_options(recorder PRIVATE ${disable_flags})
endif()
endif()
endif()
Loading
Loading