Skip to content

Commit

Permalink
Import Upstream version 6.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
timonegk committed May 21, 2022
0 parents commit 3eb3480
Show file tree
Hide file tree
Showing 66 changed files with 5,977 additions and 0 deletions.
337 changes: 337 additions & 0 deletions CHANGELOG.rst

Large diffs are not rendered by default.

175 changes: 175 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
# Copyright 2016-2018 Proyectos y Sistemas de Mantenimiento SL (eProsima).
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 3.5)

project(rmw_fastrtps_cpp)

# Default to C++14
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

if(SECURITY)
find_package(OpenSSL REQUIRED)
endif()

find_package(ament_cmake_ros REQUIRED)

find_package(rcpputils REQUIRED)
find_package(rcutils REQUIRED)
find_package(rmw_dds_common REQUIRED)
find_package(rmw_fastrtps_shared_cpp REQUIRED)
find_package(tracetools REQUIRED)

find_package(fastrtps_cmake_module REQUIRED)
find_package(fastcdr REQUIRED CONFIG)
find_package(fastrtps 2.3 REQUIRED CONFIG)
find_package(FastRTPS 2.3 REQUIRED MODULE)

find_package(rmw REQUIRED)
find_package(rosidl_runtime_c REQUIRED)
find_package(rosidl_typesupport_fastrtps_c REQUIRED)
find_package(rosidl_typesupport_fastrtps_cpp REQUIRED)

include_directories(include)

add_library(rmw_fastrtps_cpp
src/get_client.cpp
src/get_participant.cpp
src/get_publisher.cpp
src/get_service.cpp
src/get_subscriber.cpp
src/identifier.cpp
src/init_rmw_context_impl.cpp
src/publisher.cpp
src/rmw_logging.cpp
src/rmw_client.cpp
src/rmw_compare_gids_equal.cpp
src/rmw_count.cpp
src/rmw_event.cpp
src/rmw_features.cpp
src/rmw_get_gid_for_publisher.cpp
src/rmw_get_implementation_identifier.cpp
src/rmw_get_serialization_format.cpp
src/rmw_get_topic_endpoint_info.cpp
src/rmw_guard_condition.cpp
src/rmw_init.cpp
src/rmw_node.cpp
src/rmw_node_info_and_types.cpp
src/rmw_node_names.cpp
src/rmw_publish.cpp
src/rmw_publisher.cpp
src/rmw_qos.cpp
src/rmw_request.cpp
src/rmw_response.cpp
src/rmw_serialize.cpp
src/rmw_service.cpp
src/rmw_service_names_and_types.cpp
src/rmw_service_server_is_available.cpp
src/rmw_subscription.cpp
src/rmw_take.cpp
src/rmw_topic_names_and_types.cpp
src/rmw_trigger_guard_condition.cpp
src/rmw_wait.cpp
src/rmw_wait_set.cpp
src/serialization_format.cpp
src/subscription.cpp
src/type_support_common.cpp
src/rmw_get_endpoint_network_flow.cpp
)
target_link_libraries(rmw_fastrtps_cpp
fastcdr fastrtps)

# specific order: dependents before dependencies
ament_target_dependencies(rmw_fastrtps_cpp
"rcpputils"
"rcutils"
"rosidl_typesupport_fastrtps_c"
"rosidl_typesupport_fastrtps_cpp"
"rmw_dds_common"
"rmw_fastrtps_shared_cpp"
"rmw"
"rosidl_runtime_c"
"tracetools"
)

target_link_libraries(rmw_fastrtps_cpp
${rmw_dds_common_LIBRARIES__rosidl_typesupport_fastrtps_cpp}
)

configure_rmw_library(rmw_fastrtps_cpp)

# Causes the visibility macros to use dllexport rather than dllimport,
# which is appropriate when building the dll but not consuming it.
target_compile_definitions(${PROJECT_NAME}
PRIVATE "RMW_FASTRTPS_CPP_BUILDING_LIBRARY")

# Export old-style CMake variables
ament_export_include_directories("include/${PROJECT_NAME}")
ament_export_libraries(rmw_fastrtps_cpp)

# specific order: dependents before dependencies
ament_export_dependencies(rcutils)
ament_export_dependencies(rmw)
ament_export_dependencies(rmw_dds_common)
ament_export_dependencies(rmw_fastrtps_shared_cpp)
ament_export_dependencies(rosidl_runtime_c)
ament_export_dependencies(rosidl_typesupport_fastrtps_c)
ament_export_dependencies(rosidl_typesupport_fastrtps_cpp)
ament_export_dependencies(tracetools)

register_rmw_implementation(
"c:rosidl_typesupport_c:rosidl_typesupport_fastrtps_c:rosidl_typesupport_introspection_c"
"cpp:rosidl_typesupport_cpp:rosidl_typesupport_fastrtps_cpp:rosidl_typesupport_introspection_cpp")

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()

find_package(ament_cmake_gtest REQUIRED)
find_package(osrf_testing_tools_cpp REQUIRED)
find_package(test_msgs REQUIRED)

ament_add_gtest(test_get_native_entities
test/test_get_native_entities.cpp)
ament_target_dependencies(test_get_native_entities
osrf_testing_tools_cpp rcutils rmw test_msgs
)
target_link_libraries(test_get_native_entities rmw_fastrtps_cpp)

ament_add_gtest(test_logging test/test_logging.cpp)
ament_target_dependencies(test_logging rmw)
target_link_libraries(test_logging rmw_fastrtps_cpp)
endif()

ament_package(
CONFIG_EXTRAS_POST "rmw_fastrtps_cpp-extras.cmake"
)

install(
DIRECTORY include/
DESTINATION include/${PROJECT_NAME}
)

install(
TARGETS rmw_fastrtps_cpp
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)
31 changes: 31 additions & 0 deletions Doxyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# All settings not listed here will use the Doxygen default values.

PROJECT_NAME = "rmw_fastrtps_cpp"
PROJECT_NUMBER = master
PROJECT_BRIEF = "Implement the ROS middleware interface using eProsima FastRTPS static code generation in C++."

INPUT = ./include

RECURSIVE = YES
OUTPUT_DIRECTORY = doc_output

EXTRACT_ALL = YES
SORT_MEMBER_DOCS = NO

GENERATE_LATEX = NO

ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = YES
EXPAND_ONLY_PREDEF = YES
PREDEFINED = RMW_FASTRTPS_CPP_PUBLIC=

# Tag files that do not exist will produce a warning and cross-project linking will not work.
TAGFILES += "../../../../doxygen_tag_files/cppreference-doxygen-web.tag.xml=http://en.cppreference.com/w/"
# Consider changing "latest" to the version you want to reference (e.g. beta1 or 1.0.0)
TAGFILES += "../../../../doxygen_tag_files/rclcpp.tag=http://docs.ros2.org/latest/api/rclcpp/"
TAGFILES += "../../../../doxygen_tag_files/rcl.tag=http://docs.ros2.org/latest/api/rcl/"
TAGFILES += "../../../../doxygen_tag_files/rmw.tag=http://docs.ros2.org/latest/api/rmw/"
TAGFILES += "../../../../doxygen_tag_files/rcutils.tag=http://docs.ros2.org/latest/api/rcutils/"
TAGFILES += "../../../../doxygen_tag_files/rmw_fastrtps_shared_cpp.tag=http://docs.ros2.org/latest/api/rmw_fastrtps_shared_cpp/"
# Uncomment to generate tag files for cross-project linking.
GENERATE_TAGFILE = "../../../../doxygen_tag_files/rmw_fastrtps_cpp.tag"
Loading

0 comments on commit 3eb3480

Please sign in to comment.