Skip to content
Merged
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
7 changes: 7 additions & 0 deletions fastdds_python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ endif()

project(fastdds_python VERSION 2.3.0)

if(NOT WIN32)
# Default values for shared library suffix in MacOS
if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
set(CMAKE_SHARED_LIBRARY_SUFFIX ".so")
endif()
endif()

# Set BUILD_TESTING to OFF by default.
if(NOT BUILD_TESTING)
message(STATUS "Tests not compiled by default")
Expand Down
21 changes: 21 additions & 0 deletions fastdds_python/test/types/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ find_package(fastdds 3 REQUIRED)

set(CMAKE_POSITION_INDEPENDENT_CODE ON)

if(NOT WIN32)
# Default values for shared library suffix in MacOS
if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
set(CMAKE_SHARED_LIBRARY_SUFFIX ".so")
endif()
endif()

#Create library for C++ types
add_library(${PROJECT_NAME} SHARED
test_included_modulesTypeObjectSupport.cxx
Expand Down Expand Up @@ -146,6 +153,13 @@ find_package(fastdds 3 REQUIRED)

set(CMAKE_POSITION_INDEPENDENT_CODE ON)

if(NOT WIN32)
# Default values for shared library suffix in MacOS
if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
set(CMAKE_SHARED_LIBRARY_SUFFIX ".so")
endif()
endif()

#Create library for C++ types
add_library(${PROJECT_NAME} SHARED
test_modulesTypeObjectSupport.cxx
Expand Down Expand Up @@ -251,6 +265,13 @@ find_package(fastdds 3 REQUIRED)

set(CMAKE_POSITION_INDEPENDENT_CODE ON)

if(NOT WIN32)
# Default values for shared library suffix in MacOS
if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
set(CMAKE_SHARED_LIBRARY_SUFFIX ".so")
endif()
endif()

#Create library for C++ types
add_library(${PROJECT_NAME} SHARED
test_completeTypeObjectSupport.cxx
Expand Down
15 changes: 15 additions & 0 deletions fastdds_python/test/types/test_complete.i
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,11 @@ namespace swig {
eprosima::fastcdr::fixed_string<16> tmp(value);
$self->fixed_string_field(tmp);
}

std::string fixed_string_field_str() const
{
return std::string($self->fixed_string_field(), strnlen($self->fixed_string_field(), 16));
}
}


Expand Down Expand Up @@ -444,6 +449,11 @@ namespace swig {
eprosima::fastcdr::fixed_string<16> tmp(value);
$self->fixed_string_field(tmp);
}

std::string fixed_string_field_str() const
{
return std::string($self->fixed_string_field(), strnlen($self->fixed_string_field(), 16));
}
}


Expand Down Expand Up @@ -1699,6 +1709,11 @@ namespace swig {
eprosima::fastcdr::fixed_string<16> tmp(value);
$self->fixed_string_field(tmp);
}

std::string fixed_string_field_str() const
{
return std::string($self->fixed_string_field(), strnlen($self->fixed_string_field(), 16));
}
}


Expand Down
15 changes: 15 additions & 0 deletions fastdds_python/test/types/test_modules.i
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,11 @@ namespace swig {
eprosima::fastcdr::fixed_string<16> tmp(value);
$self->fixed_string_field(tmp);
}

std::string fixed_string_field_str() const
{
return std::string($self->fixed_string_field(), strnlen($self->fixed_string_field(), 16));
}
}


Expand Down Expand Up @@ -432,6 +437,11 @@ namespace swig {
eprosima::fastcdr::fixed_string<16> tmp(value);
$self->fixed_string_field(tmp);
}

std::string fixed_string_field_str() const
{
return std::string($self->fixed_string_field(), strnlen($self->fixed_string_field(), 16));
}
}


Expand Down Expand Up @@ -1687,6 +1697,11 @@ namespace swig {
eprosima::fastcdr::fixed_string<16> tmp(value);
$self->fixed_string_field(tmp);
}

std::string fixed_string_field_str() const
{
return std::string($self->fixed_string_field(), strnlen($self->fixed_string_field(), 16));
}
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ find_package(fastdds 3 REQUIRED)

set(CMAKE_POSITION_INDEPENDENT_CODE ON)

if(NOT WIN32)
# Default values for shared library suffix in MacOS
if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
set(CMAKE_SHARED_LIBRARY_SUFFIX ".so")
endif()
endif()

#Create library for C++ types
add_library(${PROJECT_NAME} SHARED
HelloWorldTypeObjectSupport.cxx
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ find_package(fastdds 3 REQUIRED)

set(CMAKE_POSITION_INDEPENDENT_CODE ON)

if(NOT WIN32)
# Default values for shared library suffix in MacOS
if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
set(CMAKE_SHARED_LIBRARY_SUFFIX ".so")
endif()
endif()

#Create library for C++ types
add_library(${PROJECT_NAME} SHARED
calculatorTypeObjectSupport.cxx
Expand Down