From 302c999b05da640116bb848ef44542268a2f434e Mon Sep 17 00:00:00 2001 From: elianalf <62831776+elianalf@users.noreply.github.com> Date: Thu, 29 Feb 2024 17:04:22 +0100 Subject: [PATCH] Branch-out for fastdds 3.0.x (#96) Signed-off-by: elianalf <62831776+elianalf@users.noreply.github.com> --- .github/workflows/test.meta | 2 +- fastdds_python/CMakeLists.txt | 2 +- fastdds_python/colcon.pkg | 2 +- fastdds_python/src/swig/CMakeLists.txt | 2 +- fastdds_python/src/swig/fastdds.i | 3 +- .../test/api/DEFAULT_FASTDDS_PROFILES.xml | 47 +++++++++++++++++++ .../test/api/DEFAULT_FASTRTPS_PROFILES.xml | 2 +- fastdds_python/test/types/CMakeLists.txt | 18 +++---- .../HelloWorldExample/CMakeLists.txt | 6 +-- fastdds_python_examples/colcon.pkg | 2 +- 10 files changed, 66 insertions(+), 20 deletions(-) create mode 100644 fastdds_python/test/api/DEFAULT_FASTDDS_PROFILES.xml diff --git a/.github/workflows/test.meta b/.github/workflows/test.meta index 1271f248..a163fc87 100644 --- a/.github/workflows/test.meta +++ b/.github/workflows/test.meta @@ -1,7 +1,7 @@ { "names": { - "fastrtps": + "fastdds": { "cmake-args": [ "-DSECURITY=ON" diff --git a/fastdds_python/CMakeLists.txt b/fastdds_python/CMakeLists.txt index 19d866c0..51e7aaa8 100644 --- a/fastdds_python/CMakeLists.txt +++ b/fastdds_python/CMakeLists.txt @@ -43,7 +43,7 @@ set(CMAKE_SWIG_FLAGS "") find_package(Python3 COMPONENTS Interpreter Development REQUIRED) find_package(fastcdr REQUIRED) -find_package(fastrtps 2.12 REQUIRED) +find_package(fastdds 3 REQUIRED) ############################################################################### # Project subdirectories diff --git a/fastdds_python/colcon.pkg b/fastdds_python/colcon.pkg index e0346091..2eae5c49 100644 --- a/fastdds_python/colcon.pkg +++ b/fastdds_python/colcon.pkg @@ -1,5 +1,5 @@ { "name": "fastdds_python", "type": "cmake", - "build-dependencies": ["fastrtps"] + "build-dependencies": ["fastdds"] } diff --git a/fastdds_python/src/swig/CMakeLists.txt b/fastdds_python/src/swig/CMakeLists.txt index c30d7820..393643b4 100644 --- a/fastdds_python/src/swig/CMakeLists.txt +++ b/fastdds_python/src/swig/CMakeLists.txt @@ -56,7 +56,7 @@ endif() target_link_libraries(${PROJECT_NAME} Python3::Module fastcdr - fastrtps + fastdds ) # Find the installation path diff --git a/fastdds_python/src/swig/fastdds.i b/fastdds_python/src/swig/fastdds.i index 9e5275f2..0f7b062e 100644 --- a/fastdds_python/src/swig/fastdds.i +++ b/fastdds_python/src/swig/fastdds.i @@ -57,7 +57,7 @@ %include "typemaps.i" %{ -#include "fastrtps/config.h" +#include "fastdds/config.h" bool has_statistics() { @@ -90,7 +90,6 @@ bool has_statistics(); // Macro delcarations // Any macro used on the Fast DDS header files will give an error if it is not redefined here #define RTPS_DllAPI -#define FASTRTPS_DEPRECATED(msg) #define FASTDDS_DEPRECATED_UNTIL(major, entity_name, msg) #define FASTDDS_TODO_BEFORE(major, minor, msg) diff --git a/fastdds_python/test/api/DEFAULT_FASTDDS_PROFILES.xml b/fastdds_python/test/api/DEFAULT_FASTDDS_PROFILES.xml new file mode 100644 index 00000000..ad16f819 --- /dev/null +++ b/fastdds_python/test/api/DEFAULT_FASTDDS_PROFILES.xml @@ -0,0 +1,47 @@ + + + + + 3 + + test_name + + + + + + + + partition_name_c + + + + + + + + + + partition_name_b + + + + + + + + + VOLATILE + + + + + + + + RELIABLE + + + + + diff --git a/fastdds_python/test/api/DEFAULT_FASTRTPS_PROFILES.xml b/fastdds_python/test/api/DEFAULT_FASTRTPS_PROFILES.xml index 10253650..ad16f819 100644 --- a/fastdds_python/test/api/DEFAULT_FASTRTPS_PROFILES.xml +++ b/fastdds_python/test/api/DEFAULT_FASTRTPS_PROFILES.xml @@ -1,5 +1,5 @@ - + 3 diff --git a/fastdds_python/test/types/CMakeLists.txt b/fastdds_python/test/types/CMakeLists.txt index 50330045..f2560d17 100644 --- a/fastdds_python/test/types/CMakeLists.txt +++ b/fastdds_python/test/types/CMakeLists.txt @@ -23,7 +23,7 @@ message(STATUS "Configuring python wrapper for types in test_included_modules... project(test_included_modules) find_package(fastcdr REQUIRED) -find_package(fastrtps REQUIRED) +find_package(fastdds REQUIRED) set(CMAKE_POSITION_INDEPENDENT_CODE ON) @@ -43,7 +43,7 @@ target_include_directories(${PROJECT_NAME} PUBLIC target_link_libraries(${PROJECT_NAME} PUBLIC fastcdr - fastrtps + fastdds ) ############################################################################### @@ -88,7 +88,7 @@ endif() target_link_libraries(${${PROJECT_NAME}_MODULE} Python3::Module - fastrtps + fastdds ${PROJECT_NAME} ) @@ -131,7 +131,7 @@ message(STATUS "Configuring python wrapper for types in test_modules...") project(test_modules) find_package(fastcdr REQUIRED) -find_package(fastrtps REQUIRED) +find_package(fastdds REQUIRED) set(CMAKE_POSITION_INDEPENDENT_CODE ON) @@ -151,7 +151,7 @@ target_include_directories(${PROJECT_NAME} PUBLIC target_link_libraries(${PROJECT_NAME} PUBLIC fastcdr - fastrtps + fastdds ) ############################################################################### @@ -196,7 +196,7 @@ endif() target_link_libraries(${${PROJECT_NAME}_MODULE} Python3::Module - fastrtps + fastdds ${PROJECT_NAME} ) @@ -239,7 +239,7 @@ message(STATUS "Configuring python wrapper for types in test_complete...") project(test_complete) find_package(fastcdr REQUIRED) -find_package(fastrtps REQUIRED) +find_package(fastdds REQUIRED) set(CMAKE_POSITION_INDEPENDENT_CODE ON) @@ -259,7 +259,7 @@ target_include_directories(${PROJECT_NAME} PUBLIC target_link_libraries(${PROJECT_NAME} PUBLIC fastcdr - fastrtps + fastdds test_included_modules ) @@ -305,7 +305,7 @@ endif() target_link_libraries(${${PROJECT_NAME}_MODULE} Python3::Module - fastrtps + fastdds ${PROJECT_NAME} ) diff --git a/fastdds_python_examples/HelloWorldExample/CMakeLists.txt b/fastdds_python_examples/HelloWorldExample/CMakeLists.txt index 00f015ac..3ec9d618 100644 --- a/fastdds_python_examples/HelloWorldExample/CMakeLists.txt +++ b/fastdds_python_examples/HelloWorldExample/CMakeLists.txt @@ -23,7 +23,7 @@ message(STATUS "Configuring python wrapper for types in HelloWorld...") project(HelloWorld) find_package(fastcdr REQUIRED) -find_package(fastrtps REQUIRED) +find_package(fastdds REQUIRED) set(CMAKE_POSITION_INDEPENDENT_CODE ON) @@ -43,7 +43,7 @@ target_include_directories(${PROJECT_NAME} PUBLIC target_link_libraries(${PROJECT_NAME} PUBLIC fastcdr - fastrtps + fastdds ) ############################################################################### @@ -88,7 +88,7 @@ endif() target_link_libraries(${${PROJECT_NAME}_MODULE} Python3::Module - fastrtps + fastdds ${PROJECT_NAME} ) diff --git a/fastdds_python_examples/colcon.pkg b/fastdds_python_examples/colcon.pkg index 7d75aedd..3947520f 100644 --- a/fastdds_python_examples/colcon.pkg +++ b/fastdds_python_examples/colcon.pkg @@ -4,6 +4,6 @@ "build-dependencies": [ "fastdds_python", "fastcdr", - "fastrtps" + "fastdds" ] }