Skip to content

Commit

Permalink
Support XCDRv1 and XCDRv2 (#156)
Browse files Browse the repository at this point in the history
* Refs #18687. Adding EncodingAlgorithmFlag

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix tests

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. First test for optional PLAIN_CDR2

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. First test for optional PLAIN_CDR and PL_CDR

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. First test for xcdrv1 members.

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix MemberLongHeader for v1: removed flags

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Add CdrVersion

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. First tests with xcdrv2

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Add optional class

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix c++11

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix contructor for non-trivial classes

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fixes

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix assign value

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix integration with fastddsgen

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Move fixed_string here

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Add tests

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Finish test for primitive types

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. First tests with alignment

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Add support of sequences of maps

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Finish tests for primitive types

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Improve management of recursive inner MemberId

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Extra check in two tests

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Add operator != to optional

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Starting to bring size calculation here

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Brought size calculation here

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Add support enums and fixes

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Improve tests and starting mutables

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. More test

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Support of NEXTINT + DHEADER

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Update optional tests to support serialize_type

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Remove old api functions

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Little improve

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. More tests

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. More tests for appendable and mutables

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Support string wstring in xcdr2

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Added tests for enum

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Support for arrays

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Support for sequences

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Remove extensibility for collections and add maps

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix after rebasing

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix warnings on windows

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix more warnings

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix more warnings

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix more warnings

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix execution of tests on Windows

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Upgrade CMake version to 3.22

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix execution of test in directories with spaces

Signed-off-by: Ricardo González <[email protected]>

* Refs #18687. Fix warning

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix compilation error with VS2017

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix test with wchar in Windows

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix compilation warnings with VS2017

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix compilation warnings with VS2017

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix compilation warnings with VS2017

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix compilation warnings with VS2017

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Add BadOptionalAccessException

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. optional documented

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix not pushed exception

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Improve doxygen for new features.

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix compilation error on windows

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Bump version 2.0.0

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Autoselect of cdr version

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Move the calculate_serialized_size to extern

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Use extern serialize/deserialize and fix bug found in review.

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Add support for std::bitset

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Added empty functions for raw cdr

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix errors

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix using multi-arrays

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Added tests for fixed_size_string

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix recursive containers

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Remove duplicated code

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Applying style

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Remove old code

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Add missing header licenses

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Apply suggestions.

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Apply suggestions.

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Apply suggestions.

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Apply suggestions.

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Apply suggestions.

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Apply suggestions.

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Apply suggestions.

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Apply suggestions.

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Add regression test

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix bug detected in revision

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix wchar_t

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Add bitset to calculator and fix wchar_t

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix compilation error on Windows

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. BUILD_TESTING OFF by default

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Activate tests on github action

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Remove EPROSIMA_BUILD

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Change Cdr_DllAPI

Signed-off-by: Ricardo González <[email protected]>

* Refs #18687. More Cdr_DllAPI

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Reordering for windows

Signed-off-by: Ricardo González <[email protected]>

* Refs #18687. Fix windows linkage

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix on windows

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix on windows

Signed-off-by: Ricardo González <[email protected]>

* Refs #18687. Fix on VS 2017

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Apply suggestions

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Apply suggestions

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Apply suggestions

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Apply suggestions

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Forgot a file

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix in sequences

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Apply suggestions

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Add info of tests

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Add tests for calculator

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Add doxygen for fixed_string

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Add doxygen for CdrSizeCalculator

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix doxygen

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix in repos file

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Apply suggestions

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Apply suggestions

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Don't POP after PUSH(origin=0)

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Apply suggestions

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Add versions.md file

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Apply suggestions

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Apply suggestions

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Apply suggestions

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Apply suggestions

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Apply suggestions

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix compilation on Windows.

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Fix test on Mac.

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Apply suugestions

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Apply suugestions

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Apply suggestions

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #18687. Apply suggestions

Signed-off-by: Ricardo González Moreno <[email protected]>

---------

Signed-off-by: Ricardo González Moreno <[email protected]>
Signed-off-by: Ricardo González <[email protected]>
  • Loading branch information
richiware authored Sep 7, 2023
1 parent 7903452 commit 37d84c8
Show file tree
Hide file tree
Showing 60 changed files with 29,906 additions and 8,095 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/fastcdr-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
colcon build \
--event-handlers=console_direct+ \
--packages-select fastcdr \
--cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo -DEPROSIMA_BUILD_TESTS=ON \
--cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=ON \
${{ inputs.cmake_args }}
- name: Run Tests
Expand Down
154 changes: 11 additions & 143 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,7 @@
###############################################################################
# CMake build rules for FastCDR #
###############################################################################
cmake_minimum_required(VERSION 3.16.3)

set(IS_TOP_LEVEL TRUE)
if(PROJECT_SOURCE_DIR)
set(IS_TOP_LEVEL FALSE)
endif()
cmake_minimum_required(VERSION 3.22)

# Set CMAKE_BUILD_TYPE to Release by default.
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
Expand All @@ -31,58 +26,16 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif()

###############################################################################
# Version information #
###############################################################################

#If not set, copy over product version from configure.ac
file(STRINGS
configure.ac
LIB_MAJOR_VERSION_TMP
REGEX "^m4_define\\(\\[?version_major\\]?, *\\[?[0-9]+\\]?\\)"
)
file(STRINGS
configure.ac
LIB_MINOR_VERSION_TMP
REGEX "^m4_define\\(\\[?version_minor\\]?, *\\[?[0-9]+\\]?\\)"
)
file(STRINGS
configure.ac
LIB_PATCH_VERSION_TMP
REGEX "^m4_define\\(\\[?version_micro\\]?, *\\[?[0-9]+\\]?\\)"
)

string(REGEX REPLACE "m4_define\\(\\[?version_major\\]?, *\\[?([0-9]+)\\]?\\)"
"\\1"
LIB_MAJOR_VERSION
${LIB_MAJOR_VERSION_TMP}
)
string(REGEX REPLACE "m4_define\\(\\[?version_minor\\]?, *\\[?([0-9]+)\\]?\\)"
"\\1"
LIB_MINOR_VERSION
${LIB_MINOR_VERSION_TMP}
)
string(REGEX REPLACE "m4_define\\(\\[?version_micro\\]?, *\\[?([0-9]+)\\]?\\)"
"\\1"
LIB_PATCH_VERSION
${LIB_PATCH_VERSION_TMP}
)

set(LIB_VERSION_STR "${LIB_MAJOR_VERSION}.${LIB_MINOR_VERSION}.${LIB_PATCH_VERSION}")
# Set BUILD_TESTING to OFF by default.
if(NOT BUILD_TESTING)
message(STATUS "Tests not compiled by default")
set(BUILD_TESTING OFF CACHE BOOL "Enable testing" FORCE)
endif()

###############################################################################
# Project #
###############################################################################
if(CMAKE_VERSION VERSION_LESS 3.0)
project(fastcdr CXX)
set(PROJECT_VERSION_MAJOR "${LIB_MAJOR_VERSION}")
set(PROJECT_VERSION_MINOR "${LIB_MINOR_VERSION}")
set(PROJECT_VERSION_PATCH "${LIB_PATCH_VERSION}")
set(PROJECT_VERSION "${LIB_VERSION_STR}")
else()
cmake_policy(SET CMP0048 NEW)
project(fastcdr VERSION "${LIB_VERSION_STR}" LANGUAGES CXX)
endif()
project(fastcdr VERSION 2.0.0 LANGUAGES CXX)

set(PROJECT_NAME_STYLED "FastCDR")
set(PROJECT_NAME_LARGE "Fast CDR")
Expand All @@ -92,12 +45,6 @@ set(${PROJECT_NAME}_DESCRIPTION "eProsima ${PROJECT_NAME_LARGE} library provides

message(STATUS "Configuring ${PROJECT_NAME_LARGE}")
message(STATUS "Version: ${PROJECT_VERSION}")
message(STATUS "To change the version modify the file configure.ac")

###############################################################################
# Generation of windows installers.
###############################################################################
option(EPROSIMA_INSTALLER "Activate the creation of a build to create windows installers" OFF)

###############################################################################
# CCache on Windows on CI
Expand Down Expand Up @@ -129,16 +76,6 @@ endif()
# unless the library was explicitly added as a static library.
option(BUILD_SHARED_LIBS "Create shared libraries by default" ON)

###############################################################################
# Load external eProsima projects.
###############################################################################

option(EPROSIMA_BUILD "Activate internal building" OFF)

if(EPROSIMA_INSTALLER)
set(EPROSIMA_BUILD ON)
endif()

###############################################################################
# Test system configuration
###############################################################################
Expand Down Expand Up @@ -181,33 +118,20 @@ else()
set(DOC_DIR "${DATA_INSTALL_DIR}/doc")
endif()
set(DOC_INSTALL_DIR ${DOC_DIR} CACHE PATH "Installation directory for documentation")
if(WIN32 AND EPROSIMA_INSTALLER AND IS_TOP_LEVEL)
set(LICENSE_INSTALL_DIR . CACHE PATH "Installation directory for licenses")
else()
set(LICENSE_INSTALL_DIR ${DATA_INSTALL_DIR}/${PROJECT_NAME} CACHE PATH "Installation directory for licenses")
endif()
set(LICENSE_INSTALL_DIR ${DATA_INSTALL_DIR}/${PROJECT_NAME} CACHE PATH "Installation directory for licenses")

###############################################################################
# Compile library.
###############################################################################
add_subdirectory(src/cpp)

###############################################################################
# Testing options
###############################################################################
option(EPROSIMA_BUILD_TESTS "Activate the building and execution unit tests and integral tests" OFF)

if(EPROSIMA_BUILD AND NOT EPROSIMA_INSTALLER AND NOT EPROSIMA_INSTALLER_MINION)
set(EPROSIMA_BUILD_TESTS ON)
endif()

###############################################################################
# Testing
###############################################################################
if(EPROSIMA_BUILD_TESTS AND IS_TOP_LEVEL AND NOT EPROSIMA_INSTALLER)
enable_testing()
include(CTest)
enable_testing()
include(CTest)

if (BUILD_TESTING)
add_subdirectory(test)
endif()

Expand All @@ -218,11 +142,6 @@ endif()
option(BUILD_DOCUMENTATION "Use doxygen to create product documentation" OFF)
option(CHECK_DOCUMENTATION "Use doxygen to check code documentation" OFF)

if(EPROSIMA_INSTALLER)
set(BUILD_DOCUMENTATION ON)
set(DOXYGEN_SHOULD_SKIP_THIS_PUBLIC "DOXYGEN_SHOULD_SKIP_THIS_PUBLIC")
endif()

if(CHECK_DOCUMENTATION)
set(BUILD_DOCUMENTATION ON)
endif()
Expand Down Expand Up @@ -292,26 +211,10 @@ if(BUILD_DOCUMENTATION)

configure_file(doc/README.html.in ${README_LOCATION}/README.html @ONLY IMMEDIATE)

### ReadTheDocs ########################
# if(NOT CHECK_DOCUMENTATION)
# add_custom_target(readthedocs
# COMMAND "${WGET_EXE}" "https://media.readthedocs.org/htmlzip/eprosima-fast-cdr/v${PROJECT_VERSION}/eprosima-fast-cdr.zip"
# COMMAND "${UNZIP_EXE}" "eprosima-fast-cdr.zip" -d "${PROJECT_BINARY_DIR}/doc/"
# COMMAND ${CMAKE_COMMAND} -E remove_directory "${PROJECT_BINARY_DIR}/doc/manual"
# COMMAND ${CMAKE_COMMAND} -E rename "${PROJECT_BINARY_DIR}/doc/eprosima-fast-cdr-v${PROJECT_VERSION}" "${PROJECT_BINARY_DIR}/doc/manual"
# COMMAND ${CMAKE_COMMAND} -E remove "eprosima-fast-cdr.zip"
# )
#
# add_dependencies(readthedocs docdirs)
# endif()

add_custom_target(doc ALL
COMMENT "Generated project documentation" VERBATIM)

add_dependencies(doc doxygen)
# if(NOT CHECK_DOCUMENTATION)
# add_dependencies(doc readthedocs)
# endif()
endif()


Expand All @@ -323,9 +226,6 @@ install(FILES ${PROJECT_SOURCE_DIR}/LICENSE
DESTINATION ${LICENSE_INSTALL_DIR}
COMPONENT licenses
)
set(CPACK_COMPONENT_LICENSES_HIDDEN 1)

set(CPACK_COMPONENTS_ALL headers licenses)

if(BUILD_DOCUMENTATION)

Expand All @@ -339,36 +239,4 @@ if(BUILD_DOCUMENTATION)
DESTINATION ${README_INSTALL_LOCATION}
COMPONENT documentation
)

# if(NOT CHECK_DOCUMENTATION)
# install(DIRECTORY ${PROJECT_BINARY_DIR}/doc/manual
# DESTINATION ${DOC_INSTALL_DIR}
# COMPONENT documentation
# )
# endif()

### Documentation component
set(CPACK_COMPONENT_DOCUMENTATION_DISPLAY_NAME "Documentation")
set(CPACK_COMPONENT_DOCUMENTATION_DESCRIPTION "eProsima ${PROJECT_NAME_LARGE} documentation")

set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} documentation)
endif()

if(MSVC OR MSVC_IDE)
if(EPROSIMA_INSTALLER)
set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL}
libraries_i86Win32VS2010
libraries_x64Win64VS2010
libraries_i86Win32VS2013
libraries_x64Win64VS2013
libraries_i86Win32VS2015
libraries_x64Win64VS2015
)
else()
set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} libraries_${MSVC_ARCH})
endif()
else()
set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} libraries)
endif()

include(${PROJECT_SOURCE_DIR}/cmake/packaging/eProsimaPackaging.cmake)
18 changes: 0 additions & 18 deletions Makefile.am.in

This file was deleted.

99 changes: 0 additions & 99 deletions cmake/common/eprosima_libraries.cmake

This file was deleted.

Loading

0 comments on commit 37d84c8

Please sign in to comment.