pax_global_header 0000666 0000000 0000000 00000000064 15102103421 0014477 g ustar 00root root 0000000 0000000 52 comment=dd535f7b5fe4bc5ff95a2e57e041317ba0a7027d
eProsima-Fast-CDR-39b861f/ 0000775 0000000 0000000 00000000000 15102103421 0015123 5 ustar 00root root 0000000 0000000 eProsima-Fast-CDR-39b861f/.gitattributes 0000664 0000000 0000000 00000001231 15102103421 0020013 0 ustar 00root root 0000000 0000000 # Set default behaviour, in case users don't have core.autocrlf set.
* text=auto
# Explicitly declare text files we want to always be normalized and converted
# to native line endings on checkout.
*.c text
*.cpp text
*.cxx text
*.h text
*.stg text eol=lf
# Declare files that will always have CRLF line endings on checkout.
*.sln text eol=crlf
*.vcxproj text eol=crlf
*.vcxproj.filters text eol=crlf
*.bat text eol=crlf
# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
# To diff LibreOffice documents.
# It is needed next configuration value: diff.odf.textconv=odt2txt
*.ods diff=odf
*.odt diff=odf
*.odp diff=odf
eProsima-Fast-CDR-39b861f/.github/ 0000775 0000000 0000000 00000000000 15102103421 0016463 5 ustar 00root root 0000000 0000000 eProsima-Fast-CDR-39b861f/.github/dco.yml 0000664 0000000 0000000 00000000032 15102103421 0017746 0 ustar 00root root 0000000 0000000 require:
members: false
eProsima-Fast-CDR-39b861f/.github/pull_request_template.md 0000664 0000000 0000000 00000006122 15102103421 0023425 0 ustar 00root root 0000000 0000000
## Description
## Contributor Checklist
- [ ] Commit messages follow the project guidelines.
- [ ] The code follows the style guidelines of this project.
- [ ] Tests that thoroughly check the new feature have been added/Regression tests checking the bug and its fix have been added; the added tests pass locally
- [ ] Any new/modified methods have been properly documented using Doxygen.
- [ ] Changes are backport compatible: they do **NOT** break ABI nor change library core behavior.
- [ ] Changes are API compatible.
- [ ] New feature has been added to the `versions.md` file (if applicable).
- [ ] Applicable backports have been included in the description.
## Reviewer Checklist
- [ ] The PR has a milestone assigned.
- [ ] The title and description correctly express the PR's purpose.
- [ ] Check contributor checklist is correct.
- [ ] Check CI results: changes do not issue any warning.
- [ ] Check CI results: CI pass and failing tests are unrelated with the changes.
eProsima-Fast-CDR-39b861f/.github/workflows/ 0000775 0000000 0000000 00000000000 15102103421 0020520 5 ustar 00root root 0000000 0000000 eProsima-Fast-CDR-39b861f/.github/workflows/codeql-analysis.yml 0000664 0000000 0000000 00000004770 15102103421 0024343 0 ustar 00root root 0000000 0000000 # For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches:
- master
- 2.2.x
- 1.1.x
- 1.0.x
pull_request:
# The branches below must be a subset of the branches above
branches:
- master
- 2.2.x
- 1.1.x
- 1.0.x
schedule:
- cron: '45 16 * * 0'
jobs:
analyze:
name: Analyze
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-2022, ubuntu-22.04, macos-13, ]
language: [ 'cpp' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
# - name: Autobuild
# uses: github/codeql-action/autobuild@v1
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
- name: Build
run: |
mkdir build && cd build
cmake ..
cmake --build .
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
eProsima-Fast-CDR-39b861f/.github/workflows/config/ 0000775 0000000 0000000 00000000000 15102103421 0021765 5 ustar 00root root 0000000 0000000 eProsima-Fast-CDR-39b861f/.github/workflows/config/build.meta 0000664 0000000 0000000 00000000361 15102103421 0023734 0 ustar 00root root 0000000 0000000 names:
fastcdr:
cmake-args:
- "-DBUILD_TESTING=ON"
googletest-distribution:
cmake-args:
- "-Dgtest_force_shared_crt=ON"
- "-DBUILD_SHARED_LIBS=ON"
- "-DBUILD_GMOCK=ON"
eProsima-Fast-CDR-39b861f/.github/workflows/config/test.meta 0000664 0000000 0000000 00000000254 15102103421 0023615 0 ustar 00root root 0000000 0000000 names:
fastcdr:
ctest-args: [
"--repeat", "until-pass:3",
"--timeout", "300",
"--output-junit", "junit/junit.xml"
]
eProsima-Fast-CDR-39b861f/.github/workflows/config/test.repos 0000664 0000000 0000000 00000000223 15102103421 0024013 0 ustar 00root root 0000000 0000000 repositories:
googletest-distribution:
type: git
url: https://github.com/google/googletest.git
version: release-1.11.0
eProsima-Fast-CDR-39b861f/.github/workflows/mac-ci.yml 0000664 0000000 0000000 00000004072 15102103421 0022377 0 ustar 00root root 0000000 0000000 name: Fast CDR Mac CI
on:
workflow_dispatch:
inputs:
os-version:
description: 'OS version to run the workflow'
required: false
default: 'macos-13'
type: string
colcon-args:
description: 'Extra arguments for colcon cli'
required: false
type: string
cmake-args:
description: 'Extra arguments for cmake cli'
required: false
type: string
ctest-args:
description: 'Extra arguments for ctest cli'
required: false
type: string
fastcdr-branch:
description: 'Branch or tag of Fast CDR repository'
type: string
required: true
run-tests:
description: 'Run test suite of Fast CDR'
required: false
type: boolean
default: true
pull_request:
types:
- review_requested
paths-ignore:
- '**.md'
- '**.txt'
- '!**/CMakeLists.txt'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
mac-ci:
if: ${{ !(github.event_name == 'pull_request') || !contains(github.event.pull_request.labels.*.name, 'conflicts') }}
uses: ./.github/workflows/reusable-ci.yml
with:
# It would be desirable to have a matrix of macos OS for this job, but due to the issue opened in this ticket:
# https://github.com/orgs/community/discussions/128118 , it has been set as a single OS job.
os-version: ${{ inputs.os-version || 'macos-13' }}
label: ${{ format('mac-ci-{0}', inputs.fastcdr-branch || github.ref) }}
colcon-args: ${{ inputs.colcon-args }}
cmake-args: ${{ inputs.cmake-args }}
ctest-args: ${{ inputs.ctest-args }}
fastcdr-branch: ${{ inputs.fastcdr-branch || github.ref }}
run-build: ${{ !(github.event_name == 'pull_request') || !contains(github.event.pull_request.labels.*.name, 'skip-ci') }}
run-tests: ${{ (inputs.run-tests == true) || ((github.event_name == 'pull_request') && (!contains(github.event.pull_request.labels.*.name, 'no-test'))) }}
eProsima-Fast-CDR-39b861f/.github/workflows/mirror.yml 0000664 0000000 0000000 00000002152 15102103421 0022555 0 ustar 00root root 0000000 0000000 # .github/workflows/mirror.yml
on:
push:
branches:
- 'master'
- '1.1.x'
jobs:
mirror_job_master:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
name: Mirror master branch to API & ABI compatible minor version branches
strategy:
fail-fast: false
matrix:
dest_branch:
- '2.3.x'
- '2.x'
steps:
- name: Mirror action step
id: mirror
uses: eProsima/eProsima-CI/external/mirror-branch-action@v0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
source: 'master'
dest: ${{ matrix.dest_branch }}
mirror_job_1_x:
if: github.ref == 'refs/heads/1.1.x'
runs-on: ubuntu-latest
name: Mirror 1.1.x branch to API & ABI compatible minor version branches
strategy:
fail-fast: false
matrix:
dest_branch:
- '1.x'
steps:
- name: Mirror action step
id: mirror
uses: eProsima/eProsima-CI/external/mirror-branch-action@v0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
source: '1.1.x'
dest: ${{ matrix.dest_branch }}
eProsima-Fast-CDR-39b861f/.github/workflows/nightly-mac-ci.yml 0000664 0000000 0000000 00000001606 15102103421 0024053 0 ustar 00root root 0000000 0000000 name: Fast CDR Mac CI (nightly)
on:
workflow_dispatch:
schedule:
- cron: '0 1 * * *'
jobs:
nightly-mac-ci-master:
uses: eProsima/Fast-CDR/.github/workflows/reusable-ci.yml@master
with:
os-version: 'macos-13'
label: 'nightly-mac-ci-master'
fastcdr-branch: 'master'
run-build: true
run-tests: true
use-ccache: false
nightly-mac-ci-2_2_x:
uses: eProsima/Fast-CDR/.github/workflows/reusable-ci.yml@2.2.x
with:
os-version: 'macos-13'
label: 'nightly-mac-ci-2.2.x'
fastcdr-branch: '2.2.x'
run-build: true
run-tests: true
use-ccache: false
nightly-mac-ci-1_0_x:
uses: eProsima/Fast-CDR/.github/workflows/reusable-ci.yml@1.0.x
with:
os-version: 'macos-13'
label: 'nightly-mac-ci-1.0.x'
fastcdr-branch: '1.0.x'
run-build: true
run-tests: true
use-ccache: false
eProsima-Fast-CDR-39b861f/.github/workflows/nightly-ubuntu-ci.yml 0000664 0000000 0000000 00000001647 15102103421 0024642 0 ustar 00root root 0000000 0000000 name: Fast CDR Ubuntu CI (nightly)
on:
workflow_dispatch:
schedule:
- cron: '0 1 * * *'
jobs:
nightly-ubuntu-ci-master:
uses: eProsima/Fast-CDR/.github/workflows/reusable-ci.yml@master
with:
os-version: 'ubuntu-22.04'
label: 'nightly-ubuntu-ci-master'
fastcdr-branch: 'master'
run-build: true
run-tests: true
use-ccache: false
nightly-ubuntu-ci-2_2_x:
uses: eProsima/Fast-CDR/.github/workflows/reusable-ci.yml@2.2.x
with:
os-version: 'ubuntu-22.04'
label: 'nightly-ubuntu-ci-2.2.x'
fastcdr-branch: '2.2.x'
run-build: true
run-tests: true
use-ccache: false
nightly-ubuntu-ci-1_0_x:
uses: eProsima/Fast-CDR/.github/workflows/reusable-ci.yml@1.0.x
with:
os-version: 'ubuntu-20.04'
label: 'nightly-ubuntu-ci-1.0.x'
fastcdr-branch: '1.0.x'
run-build: true
run-tests: true
use-ccache: false
eProsima-Fast-CDR-39b861f/.github/workflows/nightly-windows-ci.yml 0000664 0000000 0000000 00000002701 15102103421 0025002 0 ustar 00root root 0000000 0000000 name: Fast CDR Windows CI (nightly)
on:
workflow_dispatch:
schedule:
- cron: '0 1 * * *'
jobs:
nightly-windows-ci-master:
strategy:
fail-fast: false
matrix:
vs-toolset:
- 'v142'
- 'v143'
uses: eProsima/Fast-CDR/.github/workflows/reusable-ci.yml@master
with:
os-version: 'windows-2022'
vs-toolset: ${{ matrix.vs-toolset }}
label: 'nightly-windows-${{ matrix.vs-toolset }}-ci-master'
fastcdr-branch: 'master'
run-build: true
run-tests: true
use-ccache: false
nightly-windows-ci-2_2_x:
strategy:
fail-fast: false
matrix:
vs-toolset:
- 'v142'
- 'v143'
uses: eProsima/Fast-CDR/.github/workflows/reusable-ci.yml@2.2.x
with:
os-version: 'windows-2022'
vs-toolset: ${{ matrix.vs-toolset }}
label: 'nightly-windows-${{ matrix.vs-toolset }}-ci-2.2.x'
fastcdr-branch: '2.2.x'
run-build: true
run-tests: true
use-ccache: false
nightly-windows-ci-1_0_x:
strategy:
fail-fast: false
matrix:
vs-toolset:
- 'v142'
- 'v143'
uses: eProsima/Fast-CDR/.github/workflows/reusable-ci.yml@1.0.x
with:
os-version: 'windows-2022'
vs-toolset: ${{ matrix.vs-toolset }}
label: 'nightly-windows-${{ matrix.vs-toolset }}-ci-1.0.x'
fastcdr-branch: '1.0.x'
run-build: true
run-tests: true
use-ccache: false
eProsima-Fast-CDR-39b861f/.github/workflows/reusable-ci.yml 0000664 0000000 0000000 00000012147 15102103421 0023443 0 ustar 00root root 0000000 0000000 name: Fast CDR reusable CI workflow
on:
workflow_call:
inputs:
os-version:
description: 'The OS image for the workflow'
required: false
default: 'ubuntu-22.04'
type: string
vs-toolset:
description: 'Windows Visual Studio toolset to use (only Windows)'
required: false
type: string
label:
description: 'ID associated to the workflow'
required: true
type: string
colcon-args:
description: 'Extra arguments for colcon cli'
required: false
type: string
cmake-args:
description: 'Extra arguments for cmake cli'
required: false
type: string
ctest-args:
description: 'Extra arguments for ctest cli'
required: false
type: string
fastcdr-branch:
description: 'Branch or tag of Fast CDR repository'
required: true
type: string
run-build:
description: 'Build Fast CDR (CI skipped otherwise)'
required: false
type: boolean
default: true
run-tests:
description: 'Run test suite of Fast CDR'
required: false
type: boolean
default: true
use-ccache:
description: 'Use CCache to speed up the build'
required: false
type: boolean
default: false
add-label:
description: 'Add the ci-pending label to the PR'
required: false
type: boolean
default: false
env:
colcon-build-default-cmake-args: ${{ contains(inputs.os-version, 'windows') && '-DCMAKE_CXX_FLAGS_INIT="/WX"' || '-DCMAKE_CXX_FLAGS_INIT="-Werror"' }}
toolset: ${{ inputs.vs-toolset && format('-T {0}', inputs.vs-toolset) || '' }}
defaults:
run:
shell: bash
jobs:
fastcdr_test:
runs-on: ${{ inputs.os-version }}
if: ${{ inputs.run-build == true }}
strategy:
fail-fast: false
matrix:
cmake-build-type:
- 'RelWithDebInfo'
steps:
- name: Add ci-pending label if PR
if: ${{ github.event_name == 'pull_request' && inputs.add-label == true}}
uses: eProsima/eProsima-CI/external/add_labels@v0
with:
labels: ci-pending
number: ${{ github.event.number }}
repo: eProsima/Fast-CDR
- name: Sync eProsima/Fast-CDR repository
uses: eProsima/eProsima-CI/external/checkout@v0
with:
path: src/fastcdr
ref: ${{ inputs.fastcdr-branch }}
- name: Install Fix Python version
uses: eProsima/eProsima-CI/external/setup-python@v0
with:
python-version: '3.11'
- name: Get minimum supported version of CMake
uses: eProsima/eProsima-CI/external/get-cmake@v0
with:
cmakeVersion: '3.22.6'
- name: Install Colcon dependencies
uses: eProsima/eProsima-CI/multiplatform/install_colcon@v0
- name: Setup CCache
uses: eProsima/eProsima-CI/external/setup-ccache-action@v0
if: ${{ inputs.use-ccache == true }}
with:
api_token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Python dependencies
uses: eProsima/eProsima-CI/multiplatform/install_python_packages@v0
with:
packages: vcstool
upgrade: false
- name: Fetch Fast DDS CI dependencies
uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0
with:
vcs_repos_file: ${{ github.workspace }}/src/fastcdr/.github/workflows/config/test.repos
destination_workspace: src
skip_existing: 'true'
- name: Colcon build
uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0
with:
colcon_meta_file: ${{ github.workspace }}/src/fastcdr/.github/workflows/config/build.meta
colcon_build_args: ${{ inputs.colcon-args }}
colcon_build_args_default: --event-handlers=console_direct+
cmake_args: ${{ inputs.cmake-args }}
cmake_args_default: ${{ env.colcon-build-default-cmake-args }} ${{ env.toolset }}
cmake_build_type: ${{ matrix.cmake-build-type }}
workspace: ${{ github.workspace }}
- name: Colcon test
id: test_fastcdr
if: ${{ inputs.run-tests == true }}
uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0
with:
colcon_meta_file: ${{ github.workspace }}/src/fastcdr/.github/workflows/config/build.meta ${{ github.workspace }}/src/fastcdr/.github/workflows/config/test.meta
colcon_test_args_default: --event-handlers=console_direct+
ctest_args: ${{ inputs.ctest-args }}
packages_names: fastcdr
workspace: ${{ github.workspace }}
test_report_artifact: ${{ inputs.label }}
- name: Fast CDR Test summary
uses: eProsima/eProsima-CI/multiplatform/junit_summary@v0
if: ${{ !cancelled() && inputs.run-tests == true }}
with:
junit_reports_dir: ${{ steps.test_fastcdr.outputs.ctest_results_path }}
print_summary: 'True'
show_failed: 'True'
show_disabled: 'False'
show_skipped: 'False'
- name: Archive Test Results
if: always()
uses: eProsima/eProsima-CI/external/upload-artifact@v0
with:
name: test-results-${{ inputs.label }}
path: log/latest_test/fastcdr
eProsima-Fast-CDR-39b861f/.github/workflows/ubuntu-ci.yml 0000664 0000000 0000000 00000004646 15102103421 0023170 0 ustar 00root root 0000000 0000000 name: Fast CDR Ubuntu CI
on:
workflow_dispatch:
inputs:
os-version:
description: 'OS version to run the workflow'
required: false
default: 'ubuntu-22.04'
type: string
colcon-args:
description: 'Extra arguments for colcon cli'
required: false
type: string
cmake-args:
description: 'Extra arguments for cmake cli'
required: false
type: string
ctest-args:
description: 'Extra arguments for ctest cli'
required: false
type: string
fastcdr-branch:
description: 'Branch or tag of Fast CDR repository'
type: string
required: true
run-tests:
description: 'Run test suite of Fast CDR'
required: false
type: boolean
default: true
use-ccache:
description: 'Use CCache to speed up the build'
required: false
type: boolean
default: false
pull_request:
types:
- review_requested
paths-ignore:
- '**.md'
- '**.txt'
- '!**/CMakeLists.txt'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
ubuntu-ci:
if: ${{ !(github.event_name == 'pull_request') || !contains(github.event.pull_request.labels.*.name, 'conflicts') }}
uses: ./.github/workflows/reusable-ci.yml
with:
# It would be desirable to have a matrix of ubuntu OS for this job, but due to the issue opened in this ticket:
# https://github.com/orgs/community/discussions/128118 , it has been set as a single OS job.
os-version: ${{ inputs.os-version || 'ubuntu-22.04' }}
label: ${{ format('ubuntu-ci-{0}', inputs.fastcdr-branch || github.ref) }}
colcon-args: ${{ inputs.colcon-args }}
cmake-args: ${{ inputs.cmake-args }}
ctest-args: ${{ inputs.ctest-args }}
fastcdr-branch: ${{ inputs.fastcdr-branch || github.ref }}
run-build: ${{ !(github.event_name == 'pull_request') || !contains(github.event.pull_request.labels.*.name, 'skip-ci') }}
run-tests: ${{ (inputs.run-tests == true) || ((github.event_name == 'pull_request') && (!contains(github.event.pull_request.labels.*.name, 'no-test'))) }}
use-ccache: ${{ inputs.use-ccache || false }}
add-label: ${{ (github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name == github.repository) && true || false }}
eProsima-Fast-CDR-39b861f/.github/workflows/windows-ci.yml 0000664 0000000 0000000 00000004664 15102103421 0023340 0 ustar 00root root 0000000 0000000 name: Fast CDR Windows CI
on:
workflow_dispatch:
inputs:
os-version:
description: 'OS version to run the workflow'
required: false
default: 'windows-2022'
type: string
vs-toolset:
description: 'Visual Studio toolset to use (Default: v142 and v143)'
required: false
default: ''
type: string
colcon-args:
description: 'Extra arguments for colcon cli'
required: false
type: string
cmake-args:
description: 'Extra arguments for cmake cli'
required: false
type: string
ctest-args:
description: 'Extra arguments for ctest cli'
required: false
type: string
fastcdr-branch:
description: 'Branch or tag of Fast CDR repository'
type: string
required: true
run-tests:
description: 'Run test suite of Fast CDR'
required: false
type: boolean
default: true
pull_request:
types:
- review_requested
paths-ignore:
- '**.md'
- '**.txt'
- '!**/CMakeLists.txt'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
windows-ci:
strategy:
fail-fast: false
matrix:
vs-toolset:
- 'v142'
- 'v143'
if: ${{ !(github.event_name == 'pull_request') || !contains(github.event.pull_request.labels.*.name, 'conflicts') }}
uses: ./.github/workflows/reusable-ci.yml
with:
# It would be desirable to have a matrix of windows OS for this job, but due to the issue opened in this ticket:
# https://github.com/orgs/community/discussions/128118 , it has been set as a single OS job.
os-version: ${{ inputs.os-version || 'windows-2022' }}
vs-toolset: ${{ inputs.vs-toolset || matrix.vs-toolset }}
label: ${{ format('windows-{0}-ci-{1}', matrix.vs-toolset, inputs.fastcdr-branch || github.ref) }}
colcon-args: ${{ inputs.colcon-args }}
cmake-args: ${{ inputs.cmake-args }}
ctest-args: ${{ inputs.ctest-args }}
fastcdr-branch: ${{ inputs.fastcdr-branch || github.ref }}
run-build: ${{ !(github.event_name == 'pull_request') || !contains(github.event.pull_request.labels.*.name, 'skip-ci') }}
run-tests: ${{ (inputs.run-tests == true) || ((github.event_name == 'pull_request') && (!contains(github.event.pull_request.labels.*.name, 'no-test'))) }}
eProsima-Fast-CDR-39b861f/.gitignore 0000664 0000000 0000000 00000000523 15102103421 0017113 0 ustar 00root root 0000000 0000000 # Backup GVim files.
*~
# Temporaly GVim files.
*.swp
# Build directory
build/
# Visual Studio user configuration files.
*.vcxproj.user
*.sdf
*.opensdf
*.suo
# Visual Studio build directories.
Debug*/
Release*/
ipch/
objs/
output/
bin/
# Lib directory
lib/
# Tags info
tags
cscope.out
# Compiled python objects
*.pyc
# Installers
*.tar.gz
eProsima-Fast-CDR-39b861f/.gitmodules 0000664 0000000 0000000 00000000000 15102103421 0017266 0 ustar 00root root 0000000 0000000 eProsima-Fast-CDR-39b861f/.ycm_extra_conf.py 0000664 0000000 0000000 00000011367 15102103421 0020563 0 ustar 00root root 0000000 0000000 # This file is NOT licensed under the GPLv3, which is the license for the rest
# of YouCompleteMe.
#
# Here's the license text for this file:
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
#
# In jurisdictions that recognize copyright laws, the author or authors
# of this software dedicate any and all copyright interest in the
# software to the public domain. We make this dedication for the benefit
# of the public at large and to the detriment of our heirs and
# successors. We intend this dedication to be an overt act of
# relinquishment in perpetuity of all present and future rights to this
# software under copyright law.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
#
# For more information, please refer to
import os
import ycm_core
# These are the compilation flags that will be used in case there's no
# compilation database set (by default, one is not set).
# CHANGE THIS LIST OF FLAGS. YES, THIS IS THE DROID YOU HAVE BEEN LOOKING FOR.
flags = [
'-Wall',
'-Wextra',
'-Werror',
'-Wno-long-long',
'-Wno-variadic-macros',
'-fexceptions',
'-std=c++11',
'-x',
'c++',
'-isystem',
'/usr/include',
'-I',
'include',
'-I',
os.environ['EPROSIMADIR'] + '/code',
]
# Set this to the absolute path to the folder (NOT the file!) containing the
# compile_commands.json file to use that instead of 'flags'. See here for
# more details: http://clang.llvm.org/docs/JSONCompilationDatabase.html
#
# Most projects will NOT need to set this to anything; you can just change the
# 'flags' list of compilation flags. Notice that YCM itself uses that approach.
compilation_database_folder = ''
if os.path.exists( compilation_database_folder ):
database = ycm_core.CompilationDatabase( compilation_database_folder )
else:
database = None
SOURCE_EXTENSIONS = [ '.cpp', '.cxx', '.cc', '.c', '.m', '.mm' ]
def DirectoryOfThisScript():
return os.path.dirname( os.path.abspath( __file__ ) )
def MakeRelativePathsInFlagsAbsolute( flags, working_directory ):
if not working_directory:
return list( flags )
new_flags = []
make_next_absolute = False
path_flags = [ '-isystem', '-I', '-iquote', '--sysroot=' ]
for flag in flags:
new_flag = flag
if make_next_absolute:
make_next_absolute = False
if not flag.startswith( '/' ):
new_flag = os.path.join( working_directory, flag )
for path_flag in path_flags:
if flag == path_flag:
make_next_absolute = True
break
if flag.startswith( path_flag ):
path = flag[ len( path_flag ): ]
new_flag = path_flag + os.path.join( working_directory, path )
break
if new_flag:
new_flags.append( new_flag )
return new_flags
def IsHeaderFile( filename ):
extension = os.path.splitext( filename )[ 1 ]
return extension in [ '.h', '.hxx', '.hpp', '.hh' ]
def GetCompilationInfoForFile( filename ):
# The compilation_commands.json file generated by CMake does not have entries
# for header files. So we do our best by asking the db for flags for a
# corresponding source file, if any. If one exists, the flags for that file
# should be good enough.
if IsHeaderFile( filename ):
basename = os.path.splitext( filename )[ 0 ]
for extension in SOURCE_EXTENSIONS:
replacement_file = basename + extension
if os.path.exists( replacement_file ):
compilation_info = database.GetCompilationInfoForFile(
replacement_file )
if compilation_info.compiler_flags_:
return compilation_info
return None
return database.GetCompilationInfoForFile( filename )
def FlagsForFile( filename, **kwargs ):
if database:
# Bear in mind that compilation_info.compiler_flags_ does NOT return a
# python list, but a "list-like" StringVec object
compilation_info = GetCompilationInfoForFile( filename )
if not compilation_info:
return None
final_flags = MakeRelativePathsInFlagsAbsolute(
compilation_info.compiler_flags_,
compilation_info.compiler_working_dir_ )
else:
relative_to = DirectoryOfThisScript()
final_flags = MakeRelativePathsInFlagsAbsolute( flags, relative_to )
return {
'flags': final_flags,
'do_cache': True
}
eProsima-Fast-CDR-39b861f/CMakeLists.txt 0000664 0000000 0000000 00000023430 15102103421 0017665 0 ustar 00root root 0000000 0000000 # Copyright 2016 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 build rules for FastCDR #
###############################################################################
cmake_minimum_required(VERSION 3.20)
# Set CMAKE_BUILD_TYPE to Release by default.
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to 'Release' as none was specified.")
set(CMAKE_BUILD_TYPE Release CACHE STRING
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif()
# 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 #
###############################################################################
project(fastcdr VERSION 2.3.4 LANGUAGES CXX)
set(PROJECT_NAME_STYLED "FastCDR")
set(PROJECT_NAME_LARGE "Fast CDR")
string(TOUPPER "${PROJECT_NAME}" PROJECT_NAME_UPPER)
set(${PROJECT_NAME}_DESCRIPTION_SUMMARY "C++ library for serialize using CDR serialization")
set(${PROJECT_NAME}_DESCRIPTION "eProsima ${PROJECT_NAME_LARGE} library provides two serialization mechanisms. One is the standard CDR serialization mechanism, while the other is a faster implementation that modifies the standard.")
message(STATUS "Configuring ${PROJECT_NAME_LARGE}")
message(STATUS "Version: ${PROJECT_VERSION}")
###############################################################################
# GCC colors if using CCache
###############################################################################
if("${CMAKE_CXX_COMPILER_LAUNCHER}" STREQUAL "ccache" AND
CMAKE_COMPILER_IS_GNUCXX AND
CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4,8)
add_compile_options(-fdiagnostics-color=always)
endif()
###############################################################################
# Default shared libraries
###############################################################################
# Global flag to cause add_library() to create shared libraries if on.
# If set to true, this will cause all libraries to be built shared
# unless the library was explicitly added as a static library.
option(BUILD_SHARED_LIBS "Create shared libraries by default" ON)
###############################################################################
# Test system configuration
###############################################################################
include(${PROJECT_SOURCE_DIR}/cmake/common/check_configuration.cmake)
set(FORCE_CXX "11" CACHE STRING "C++ standard fulfillment selection")
check_stdcxx(${FORCE_CXX})
check_endianness()
check_type_sizes()
###############################################################################
# Check MSVC architecture
###############################################################################
if(MSVC OR MSVC_IDE)
check_msvc_arch()
endif()
###############################################################################
# Installation paths
###############################################################################
option(APPEND_PROJECT_NAME_TO_INCLUDEDIR
"When ON headers are installed to a path ending with a folder called \
${PROJECT_NAME}. This avoids include directory search order issues when \
overriding this package from a merged catkin, ament, or colcon workspace."
OFF)
set(BIN_INSTALL_DIR bin/ CACHE PATH "Installation directory for binaries")
set(_include_dir "include/")
if(APPEND_PROJECT_NAME_TO_INCLUDEDIR)
string(APPEND _include_dir "${PROJECT_NAME}/")
endif()
set(INCLUDE_INSTALL_DIR "${_include_dir}" CACHE PATH "Installation directory for C++ headers")
unset(_include_dir)
set(LIB_INSTALL_DIR lib${LIB_SUFFIX}/ CACHE PATH "Installation directory for libraries")
set(DATA_INSTALL_DIR share/ CACHE PATH "Installation directory for data")
if(WIN32)
set(DOC_DIR "doc")
else()
set(DOC_DIR "${DATA_INSTALL_DIR}/doc")
endif()
set(DOC_INSTALL_DIR ${DOC_DIR} CACHE PATH "Installation directory for documentation")
set(LICENSE_INSTALL_DIR ${DATA_INSTALL_DIR}/${PROJECT_NAME} CACHE PATH "Installation directory for licenses")
###############################################################################
# Compile library.
###############################################################################
add_subdirectory(src/cpp)
###############################################################################
# Testing
###############################################################################
enable_testing()
include(CTest)
if (BUILD_TESTING)
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.22)
add_subdirectory(test)
else()
message(INFO "Tests are disabled because the version of CMake is less than 3.22")
endif()
endif()
###############################################################################
# Documentation
###############################################################################
# Add an option to toggle the generation of the API documentation.
option(BUILD_DOCUMENTATION "Use doxygen to create product documentation" OFF)
option(CHECK_DOCUMENTATION "Use doxygen to check code documentation" OFF)
option(GENERATE_PDF_DOC "Use doxygen to generate API Reference PDF" OFF)
if(CHECK_DOCUMENTATION)
set(BUILD_DOCUMENTATION ON)
endif()
if(BUILD_DOCUMENTATION)
find_package(Doxygen)
if(NOT DOXYGEN_FOUND)
message(FATAL_ERROR "doxygen is needed to build the documentation. Please install it correctly")
endif()
if(UNIX)
find_program(DOXYFILE_MAKE make)
if(DOXYFILE_MAKE)
message(STATUS "Found Make: ${DOXYFILE_MAKE}")
else()
message(FATAL_ERROR "make is needed to build the documentation. Please install it correctly")
endif()
elseif(WIN32)
set(DOXYFILE_MAKE make.bat)
endif()
if(NOT CHECK_DOCUMENTATION)
find_program(WGET_EXE wget)
if(WGET_EXE)
message(STATUS "Found WGet: ${WGET_EXE}")
else()
message(FATAL_ERROR "wget is needed to build the documentation. Please install it correctly")
endif()
find_program(UNZIP_EXE unzip)
if(UNZIP_EXE)
message(STATUS "Found Unzip: ${UNZIP_EXE}")
else()
message(FATAL_ERROR "unzip is needed to build the documentation. Please install it correctly")
endif()
endif()
# Target to create documentation directories
add_custom_target(docdirs
COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/doc
COMMENT "Creating documentation directory" VERBATIM)
### Doxygen ########################3
if(CHECK_DOCUMENTATION)
set(USE_DOT NO)
else()
set(USE_DOT YES)
endif()
if(GENERATE_PDF_DOC)
set(GENERATE_LATEX YES)
else()
set(GENERATE_LATEX NO)
endif()
# Configure the template doxyfile for or specific project
configure_file(doxyfile.in ${PROJECT_BINARY_DIR}/doxyfile @ONLY IMMEDIATE)
# Add custom target to run doxygen when ever the project is build
add_custom_target(doxygen
COMMAND "${DOXYGEN_EXECUTABLE}" "${PROJECT_BINARY_DIR}/doxyfile"
SOURCES "${PROJECT_BINARY_DIR}/doxyfile"
COMMENT "Generating API documentation with doxygen" VERBATIM)
add_dependencies(doxygen docdirs)
if(GENERATE_PDF_DOC)
add_custom_target(make_pdf ALL
COMMAND "make" "pdf"
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/doxygen/latex
COMMENT "Generating API reference PDF" VERBATIM)
add_dependencies(make_pdf doxygen)
endif()
### README html ########################
if(WIN32)
set(README_LOCATION "${PROJECT_BINARY_DIR}/")
set(README_LOCATION_PREFFIX "doc/")
set(README_INSTALL_LOCATION ".")
else()
set(README_LOCATION "${PROJECT_BINARY_DIR}/doc/")
set(README_INSTALL_LOCATION "${DOC_INSTALL_DIR}")
endif()
configure_file(doc/README.html.in ${README_LOCATION}/README.html @ONLY IMMEDIATE)
add_custom_target(doc ALL
COMMENT "Generated project documentation" VERBATIM)
add_dependencies(doc doxygen)
endif()
###############################################################################
# Packaging
###############################################################################
# Install licenses
install(FILES ${PROJECT_SOURCE_DIR}/LICENSE
DESTINATION ${LICENSE_INSTALL_DIR}
COMPONENT licenses
)
if(BUILD_DOCUMENTATION)
# Instalation of doxygen files
install(DIRECTORY ${PROJECT_BINARY_DIR}/doc/api_reference
DESTINATION ${DOC_INSTALL_DIR}
COMPONENT documentation
)
install(FILES "${README_LOCATION}/README.html"
DESTINATION ${README_INSTALL_LOCATION}
COMPONENT documentation
)
if(GENERATE_PDF_DOC)
install(FILES "${PROJECT_BINARY_DIR}/doxygen/latex/refman.pdf"
DESTINATION ${DOC_INSTALL_DIR}
RENAME fastcdr-${PROJECT_VERSION}-api-reference.pdf
COMPONENT documentation)
endif()
endif()
eProsima-Fast-CDR-39b861f/CONTRIBUTING.md 0000664 0000000 0000000 00000003157 15102103421 0017362 0 ustar 00root root 0000000 0000000 # Contribution Guidelines
The following documents constitutes a set of guidelines to which contributors must adhere.
* [Contributions Licensing](#contributions-licensing)
* [Developer Certificate of Origin](#developer-certificate-of-origin)
* [Code Coverage](#code-coverage)
## Contributions Licensing
Any contribution that you make to this repository will be under the Apache 2 License, as dictated by that [license](http://www.apache.org/licenses/LICENSE-2.0.html):
~~~
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
~~~
## Developer Certificate of Origin
Contributors must sign-off each commit by adding a `Signed-off-by: ...` line to commit messages to certify that they have the right to submit the code they are contributing to the project according to the [Developer Certificate of Origin (DCO)](https://developercertificate.org/).
## Code Coverage
As stated in [QUALITY.md](QUALITY.md), all contributions to the project must increase line code coverage.
Because of this, contributors are asked to locally run a coverage assessment that ensures that code coverage has increased when compared to the latest execution of the [nightly coverage CI job](http://jenkins.eprosima.com:8080/job/nightly_fastdds_coverage_linux/).
eProsima-Fast-CDR-39b861f/CTestJenkins.cmake 0000664 0000000 0000000 00000010041 15102103421 0020465 0 ustar 00root root 0000000 0000000 # Copyright 2016 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.
set(CTEST_SOURCE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
set(CTEST_BINARY_DIRECTORY "${CTEST_SOURCE_DIRECTORY}/build")
set(CTEST_TEST_TIMEOUT 300)
site_name(CTEST_SITE)
set(CTEST_BUILD_NAME "${JENKINS_BUILD_NAME}")
set(CTEST_BUILD_OPTIONS "${JENKINS_BUILD_OPTIONS}")
set(CTEST_BUILD_CONFIGURATION "${JENKINS_BUILD_CONFIGURATION}")
set(CTEST_MEMORYCHECK_COMMAND_OPTIONS "${CTEST_MEMORYCHECK_COMMAND_OPTIONS} --quiet --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=50 --xml=yes --xml-file=test_%p_memcheck.xml \"--suppressions=${CTEST_SOURCE_DIRECTORY}/valgrind.supp\"")
set(CTEST_COVERAGE_C_FLAGS "-DCMAKE_C_FLAGS:STRING=-fwrapv -fprofile-arcs -ftest-coverage")
set(CTEST_COVERAGE_CXX_FLAGS "-DCMAKE_CXX_FLAGS:STRING=-fwrapv -fprofile-arcs -ftest-coverage")
set(CTEST_COVERAGE_EXE_LD_FLAGS "-DCMAKE_EXE_LINKER_FLAGS:STRING=-fprofile-arcs -ftest-coverage")
set(CTEST_COVERAGE_SHARED_LD_FLAGS "-DCMAKE_SHARED_LINKER_FLAGS:STRING=-fprofile-arcs -ftest-coverage")
include(ProcessorCount)
ProcessorCount(NUMBER_PROCESSORS)
message("Number of processors: " ${NUMBER_PROCESSORS})
if(NOT NUMBER_PROCESSORS EQUAL 0)
if(${JENKINS_GENERATOR} MATCHES "Unix Makefiles")
set(CTEST_BUILD_FLAGS "-j${NUMBER_PROCESSORS} -l${NUMBER_PROCESSORS}")
# Error using visual studio with multicore
#elseif(${JENKINS_GENERATOR} MATCHES "Visual Studio")
#set(CTEST_WIN_CXX_FLAGS "-DEPROSIMA_EXTRA_CMAKE_CXX_FLAGS:STRING=/MP")
endif()
set(CTEST_TEST_ARGS ${CTEST_TEST_ARGS} PARALLEL_LEVEL ${NUMBER_PROCESSORS})
endif()
# Check CMake version for QUIET parameter
if(${CMAKE_MAJOR_VERSION} GREATER 3 OR (${CMAKE_MAJOR_VERSION} EQUAL 3 AND ${CMAKE_MINOR_VERSION} GREATER 2))
set(QUIET_ QUIET)
endif()
ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
if(UNIX)
find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
endif()
set(CTEST_CONFIGURE_COMMAND "${CMAKE_COMMAND}")
set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} -DCMAKE_BUILD_TYPE=${CTEST_BUILD_CONFIGURATION}")
set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} ${CTEST_BUILD_OPTIONS}")
set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} ${CTEST_WIN_CXX_FLAGS}")
if(CTEST_COVERAGE_COMMAND AND NOT DISABLE_CTEST_COVERAGE)
set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} \"${CTEST_COVERAGE_C_FLAGS}\"")
set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} \"${CTEST_COVERAGE_CXX_FLAGS}\"")
set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} \"${CTEST_COVERAGE_EXE_LD_FLAGS}\"")
set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} \"${CTEST_COVERAGE_SHARED_LD_FLAGS}\"")
endif()
set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} \"${CTEST_SOURCE_DIRECTORY}\"")
set(CTEST_BUILD_COMMAND "${CMAKE_COMMAND} --build .")
if(WIN32)
set(CTEST_BUILD_COMMAND "${CTEST_BUILD_COMMAND} --config ${CTEST_BUILD_CONFIGURATION}")
endif()
set(CTEST_CONFIGURATION_TYPE ${CTEST_BUILD_CONFIGURATION})
ctest_start("${JENKINS_DASHBOARD}" ${QUIET_})
ctest_configure(RETURN_VALUE CONFIGURING_RET_VALUE ${QUIET_})
ctest_build(RETURN_VALUE BUILDING_RET_VALUE ${QUIET_})
ctest_test(${QUIET_})
if(CTEST_COVERAGE_COMMAND AND NOT DISABLE_CTEST_COVERAGE)
ctest_coverage(${QUIET_})
endif()
if(CTEST_MEMORYCHECK_COMMAND AND NOT DISABLE_CTEST_MEMORYCHECK)
ctest_memcheck(EXCLUDE_LABEL NoMemoryCheck ${QUIET_})
endif()
if(NOT CONFIGURING_RET_VALUE AND NOT BUILDING_RET_VALUE)
message(0)
else()
message(255)
endif()
eProsima-Fast-CDR-39b861f/LICENSE 0000664 0000000 0000000 00000026136 15102103421 0016140 0 ustar 00root root 0000000 0000000
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
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.
eProsima-Fast-CDR-39b861f/PLATFORM_SUPPORT.md 0000664 0000000 0000000 00000005010 15102103421 0020121 0 ustar 00root root 0000000 0000000 # Platform Support
This document reflects the level of support offered by **eProsima Fast CDR** on different platforms as per the following
definitions:
## Tier 1
Tier 1 platforms are subjected to our unit test suite and other testing tools on a frequent basis including continuous
integration jobs and nightly jobs.
Errors or bugs discovered in these platforms are prioritized for correction by the development team.
Significant errors discovered in Tier 1 platforms can impact release dates and we strive to resolve all known high
priority errors in Tier 1 platforms prior to new version releases.
## Tier 2
Tier 2 platforms are subject to periodic CI testing which runs both builds and tests with publicly accessible results.
The CI is expected to be run at least within a week of relevant changes for the current release of **Fast CDR**.
Installation instructions should be available and up-to-date in order for a platform to be listed in this category.
Package-level binary packages may not be provided but providing a downloadable archive of the built workspace is
encouraged.
Errors may be present in released product versions for Tier 2 platforms.
Known errors in Tier 2 platforms will be addressed subject to resource availability on a best effort basis and may or
may not be corrected prior to new version releases.
One or more entities should be committed to continuing support of the platform.
## Tier 3
Tier 3 platforms are those for which community reports indicate that the release is functional.
The development team does not run the unit test suite or perform any other tests on platforms in Tier 3.
Community members may provide assistance with these platforms.
## Platforms
|Architecture|Ubuntu Jammy (22.04)|MacOS Mojave (10.14)|Windows 10 (VS2019)|Ubuntu Focal (20.04)|Debian Buster (10)|
|------------|--------------------|--------------------|-------------------|--------------------|------------------|
|amd64 |Tier 1 [a][s] |Tier 1 [s] |Tier 1 [a][s] |Tier 3 [a][s] |Tier 3 [s] |
|amd32 | | |Tier 1 [a][s] | | |
|arm64 |Tier 1 [a][s] | | |Tier 3 [a][s] |Tier 3 [s] |
|arm32 |Tier 3 [s] | | |Tier 3 [s] |Tier 3 [s] |
" [a] " Binary releases are provided as a single archive per platform.\
" [s] " Compilation from source.
Other Tier 3 OS:
* FreeBSD
* VxWorks
* QNX
* Android 11
eProsima-Fast-CDR-39b861f/QUALITY.md 0000664 0000000 0000000 00000030357 15102103421 0016605 0 ustar 00root root 0000000 0000000 This document is a declaration of software quality for **eProsima Fast CDR** based on the guidelines provided in the [ROS 2 REP-2004 document](https://www.ros.org/reps/rep-2004.html).
# Quality Declaration
**eProsima Fast CDR** is a C++ library that provides two serialization mechanisms.
One is the [standard CDR](https://www.omg.org/cgi-bin/doc?formal/02-06-51) serialization mechanism, while the other is a faster implementation that modifies the standard.
**eProsima Fast CDR** claims to be in the **Quality Level 1** category.
Below are the rationales, notes and caveats for this claim, organized by each requirement listed in the [Package Requirements for Quality Level 1 in REP-2004](https://www.ros.org/reps/rep-2004.html#package-requirements).
## Version Policy [1]
### Version Scheme [1.i]
The **Versioning Policy Declaration** for **eProsima Fast CDR** can be found [here](VERSIONING.md) and it adheres to [`semver`](https://semver.org/).
### Version Stability [1.ii]
**eProsima Fast CDR** is at a stable version, i.e. `>=1.0.0`.
The latest version and the release notes can be found [here](https://github.com/eProsima/Fast-CDR/releases).
### Public API Declaration [1.iii]
The public API is documented using [Doxygen](https://www.doxygen.nl/index.html) and can be build using the CMake option `BUILD_DOCUMENTATION` set to `ON`.
The API reference generated can also be found in [eProsima webpage](https://www.eprosima.com/images/PDFs/Fast_CDR.pdf)
### API Stability Policy [1.iv]
**eProsima Fast CDR** will only break public API between major releases.
### ABI Stability Policy [1.v]
Any ABI break in **eProsima Fast CDR** will be done between minor versions and it should be clearly stated on the release notes.
## Change Control Process [2]
The stability of **eProsima Fast CDR** is ensured through reviews, CI and tests.
The change control process can be found in [CONTRIBUTING](https://github.com/eProsima/policies/blob/main/CONTRIBUTING.md)
All changes to **eProsima Fast CDR** occur through pull requests that are required to pass all CI tests.
In case of failure, only maintainers can merge the pull request, and only when there is enough evidence that the failure is unrelated to the change.
Additionally, all pull requests must have a positive review from one other contributor that did not author the pull request.
### Change Requests [2.i]
All changes will occur through a pull request.
### Contributor Origin [2.ii]
**eProsima Fast CDR** uses the [Developer Certificate of Origin (DCO)](https://developercertificate.org/) as its confirmation of contributor origin policy since version 1.0.14.
More information can be found in [CONTRIBUTING](https://github.com/eProsima/policies/blob/main/CONTRIBUTING.md)
### Peer Review Policy [2.iii]
All pull requests will be peer-reviewed by at least one other contributor who did not author the pull request. Approval is required before merging.
### Continuous Integration [2.iv]
All pull requests must pass CI to be considered for merging, unless maintainers consider that there is enough evidence that the failure is unrelated to the changes.
CI testing is automatically triggered by incoming pull requests.
Current nightly results can be seen here for all supported platforms:
* Linux [](http://jenkins.eprosima.com:8080/view/Nightly/job/nightly_fastcdr_master_linux/)
* Linux-aarch64 [](http://jenkins.eprosima.com:8080/view/Nightly/job/nightly_fastcdr_master_linux_aarch64/)
* Windows [](http://jenkins.eprosima.com:8080/job/nightly_fastcdr_master_windows/label=windows-secure,platform=x64,toolset=v142)
* Mac [](http://jenkins.eprosima.com:8080/job/nightly_fastcdr_master_mac)
### Documentation Policy [2.v]
All pull requests must resolve related documentation changes before merging as stated in [CONTRIBUTING](https://github.com/eProsima/policies/blob/main/CONTRIBUTING.md).
## Documentation [3]
### Feature Documentation [3.i]
**eProsima Fast CDR** provides only two features corresponding to each one of its serialization mechanisms:
* [Standard CDR](https://www.omg.org/cgi-bin/doc?formal/02-06-51) serialization mechanism.
* CDR standard modified to provide a faster implementation.
### Public API Documentation [3.ii]
**eProsima Fast CDR** includes a complete API Reference generated by [Doxygen](https://www.doxygen.nl/index.html) and hosted in [eProsima/all-docs](https://docs.eprosima.com/en/latest/#eprosima-fast-cdr).
### License [3.iii]
The license for **eProsima Fast CDR** is Apache 2.0, and a summary can be found in each source file.
A full copy of the license can be found [here](LICENSE).
### Copyright Statements [3.iv]
**eProsima Fast CDR** copyright holder provide a statement of copyright in each source file.
## Testing [4]
### Feature Testing [4.i]
**eProsima Fast CDR** provides tests which simulate typical usage, and they are located in the [`test` directory](test).
New features are required to have tests before being added as stated in [CONTRIBUTING](https://github.com/eProsima/policies/blob/main/CONTRIBUTING.md).
Current nightly results can be found here:
* Linux [](http://jenkins.eprosima.com:8080/view/Nightly/job/nightly_fastcdr_master_linux/)
* Linux-aarch64 [](http://jenkins.eprosima.com:8080/view/Nightly/job/nightly_fastcdr_master_linux_aarch64/)
* Windows [](http://jenkins.eprosima.com:8080/job/nightly_fastcdr_master_windows/label=windows-secure,platform=x64,toolset=v142)
* Mac [](http://jenkins.eprosima.com:8080/job/nightly_fastcdr_master_mac)
### Public API Testing [4.ii]
Each part of the public API has tests, and new additions or changes to the public API require tests before being added.
The tests aim to cover typical usage and corner cases.
### Coverage [4.iii]
[](http://jenkins.eprosima.com:8080/job/nightly_fastcdr_coverage_linux)
*eProsima Fast CDR* aims to provide a line coverage **above 95%**.
*Fast CDR* code coverage policy comprises:
1. All contributions to *Fast CDR* must increase (or at least keep) current line coverage.
This is done to ensure that the **95%** line coverage goal is eventually met.
1. Line coverage regressions are only permitted if properly justified and accepted by maintainers.
1. If the CI system reports a coverage regression after a pull request has been merged, the maintainers must study the case and decide how to proceed, mostly reverting the changes and asking for a more thorough testing of the committed changes.
1. This policy is enforced through the [nightly Fast CDR coverage CI job](http://jenkins.eprosima.com:8080/job/nightly_fastcdr_coverage_linux/).
As stated in [CONTRIBUTING.md](CONTRIBUTING.md), developers and contributors are asked to run a line coverage assessment locally before submitting a PR.
### Performance [4.iv]
**eProsima Fast CDR** does not provide performance tests.
However, performance is indirectly tested by *eprosima Fast DDS*.
Any performance regression detected in *eprosima Fast DDS* would be analyzed and, in case that it is related to **eProsima Fast CDR** or could be solved modifying this library, changes could be made to the library in order to revert the performance regression.
### Linters and Static Analysis [4.v]
**eProsima Fast CDR** [code style](https://github.com/eProsima/cpp-style) is enforced using [*uncrustify*](https://github.com/uncrustify/uncrustify).
Among the CI tests there are tests that ensures that every pull request is compliant with the code style.
The latest pull request results can be seen [here](http://jenkins.eprosima.com:8080/job/fastcdr_github_uncrustify/lastBuild/).
The tests only check files where changes have been made.
Therefore, the code style is only enforced in some files.
However, the tendency will be to homogenize the older source files to the code style.
**eProsima Fast CDR** uses [Synopsis Coverity static code analysis](https://scan.coverity.com/projects/eprosima-fast-cdr).
**eProsima Fast CDR** uses [CodeQL](https://github.com/eProsima/Fast-CDR/security/code-scanning?query=tool%3ACodeQL) to find security issues on the code.
## Dependencies [5]
### Direct Runtime Dependencies [5.iii]
**eProsima Fast CDR** has no run-time or build-time dependencies that need to be considered for this declaration.
## Platform Support [6]
**eProsima Fast CDR** supports the following platforms and tests each change against all of them as can be seen in the current nightly results:
* Linux [](http://jenkins.eprosima.com:8080/view/Nightly/job/nightly_fastcdr_master_linux/)
* Linux-aarch64 [](http://jenkins.eprosima.com:8080/view/Nightly/job/nightly_fastcdr_master_linux_aarch64/)
* Windows [](http://jenkins.eprosima.com:8080/job/nightly_fastcdr_master_windows/label=windows-secure,platform=x64,toolset=v142)
* Mac [](http://jenkins.eprosima.com:8080/job/nightly_fastcdr_master_mac)
More information about the supported platforms can be found in [PLATFORM_SUPPORT](PLATFORM_SUPPORT.md)
## Vulnerability Disclosure Policy [7.i]
**eprosima Fast CDR** vulnerability Disclosure Policy can be found [here](https://github.com/eProsima/policies/blob/main/VULNERABILITY.md)
# Current Status Summary
The chart below compares the requirements in the [REP-2004](https://www.ros.org/reps/rep-2004.html#quality-level-comparison-chart) with the current state of **eprosima Fast CDR**
|Number| Requirement| Current State |
|--|--|--|
|1| **Version policy** |---|
|1.i|Version Policy available |✓|
|1.ii|Stable version |✓|
|1.iii|Declared public API|✓|
|1.iv|API stability policy|✓|
|1.v|ABI stability policy|✓|
|2| **Change control process** |---|
|2.i| All changes occur on change request |✓|
|2.ii| Contributor origin (DCO, CLA, etc) |✓|
|2.iii| Peer review policy |✓|
|2.iv| CI policy for change requests |✓|
|2.v| Documentation policy for change requests |✓|
|3| **Documentation** | --- |
|3.i| Per feature documentation |✓|
|3.ii| Per public API item documentation |✓|
|3.iii| Declared License(s) |✓|
|3.iv| Copyright in source files|✓|
|3.v.a| Quality declaration linked to README |✓|
|3.v.b| Centralized declaration available for peer review |✓|
|4| **Testing** | --- |
|4.i| Feature items tests |✓|
|4.ii| Public API tests |✓|
|4.iii.a| Using coverage |✓|
|4.iii.b| Coverage policy |✓|
|4.iv.a| Performance tests (if applicable) |N/A|
|4.iv.b| Performance tests policy|N/A|
|4.v.a| Code style enforcement (linters)|✓|
|4.v.b| Use of static analysis tools |✓|
|5| **Dependencies** | --- |
|5.iii| Justifies quality use of dependencies |✓|
|6| **Platform support** | --- |
|6.i| Support targets Tier1 ROS platforms|✓|
|7| **Security** | --- |
|7.i| Vulnerability Disclosure Policy |✓|
eProsima-Fast-CDR-39b861f/README.md 0000664 0000000 0000000 00000006654 15102103421 0016415 0 ustar 00root root 0000000 0000000 [](https://www.eprosima.com/middleware/fast-dds)
*eProsima Fast CDR* is a C++ library that provides two serialization mechanisms.
One is the standard CDR serialization mechanism, while the other is a faster implementation that modifies the standard.
## Commercial support
Looking for commercial support? Write us to info@eprosima.com
Find more about us at [eProsima’s webpage](https://eprosima.com/).
## Build
**eProsima Fast CDR** provides [CMake][cmake] scripts to build and install it (please read the [installation guide](https://fast-dds.docs.eprosima.com/en/latest/installation/sources/sources_linux.html#cmake-installation) for more details).
Also, in [eProsima][eprosima] you can find packages for Linux using autotools and binaries for Windows.
[cmake]: http://www.cmake.org
[eprosima]: http://www.eprosima.com
## Quality Declaration
**eprosima Fast CDR** claims to be in the **Quality Level 1** category based on the guidelines provided by [ROS 2](https://ros.org/reps/rep-2004.html).
See the [Quality Declaration](QUALITY.md) for more details.
eProsima-Fast-CDR-39b861f/RELEASE_SUPPORT.md 0000664 0000000 0000000 00000004533 15102103421 0017766 0 ustar 00root root 0000000 0000000 # Release support
Please, refer to the [master branch](https://github.com/eProsima/Fast-CDR/blob/master/RELEASE_SUPPORT.md) for the latest version of this document.
*eProsima Fast CDR* maintains several releases with different support cycles.
**All of them are attached to different *eProsima Fast DDS* releases.**
## *eProsima Fast DDS* and *Fast CDR* supported versions compatibility
|Fast DDS Version|Fast CDR Version|Fast CDR Version branch|Fast CDR Latest Release|
|----------------|----------------|-----------------------|-----------------------|
|3.2, 3.3, 3.4|2.3|[2.3.x](https://github.com/eProsima/Fast-CDR/tree/2.3.x)|[v2.3.4](https://github.com/eProsima/Fast-CDR/releases/tag/v2.3.4)|
|2.14|2.2|[2.2.x](https://github.com/eProsima/Fast-CDR/tree/2.2.x)|[v2.2.6](https://github.com/eProsima/Fast-CDR/releases/tag/v2.2.6)|
|2.6|1.0|[1.0.x](https://github.com/eProsima/Fast-CDR/tree/1.0.x)|[v1.0.28](https://github.com/eProsima/Fast-CDR/releases/tag/v1.0.28)|
## *eProsima Fast DDS* and *Fast CDR* previously supported versions compatibility
|Fast DDS Version|Fast CDR Version|Fast CDR Version branch|Fast CDR Latest Release|Release Date|EOL Date|
|----------------|----------------|-----------------------|-----------------------|------------|--------|
|3.1 |2.2|[2.2.x](https://github.com/eProsima/Fast-CDR/tree/2.2.x)|[v2.2.6](https://github.com/eProsima/Fast-CDR/releases/tag/v2.2.6)|February 2023 | March 2025 [^*]|
|2.13|2.1|[2.1.x](https://github.com/eProsima/Fast-CDR/tree/2.1.x)|[v2.1.3](https://github.com/eProsima/Fast-CDR/releases/tag/v2.1.3)|December 2023|July 2024|
|2.12|2.0|[2.0.x](https://github.com/eProsima/Fast-CDR/tree/2.0.x)|[v2.0.0](https://github.com/eProsima/Fast-CDR/releases/tag/v2.0.0)|September 2023|March 2024|
|2.11|1.1|[1.1.x](https://github.com/eProsima/Fast-CDR/tree/1.1.x)|[v1.1.1](https://github.com/eProsima/Fast-CDR/releases/tag/v1.1.1)|May 2023|February 2024|
|2.10|1.0|[1.0.x](https://github.com/eProsima/Fast-CDR/tree/1.0.x)|[v1.0.28](https://github.com/eProsima/Fast-CDR/releases/tag/v1.0.28)| November 2018 | July 2024|
[^*]: Support may be extended.
For detailed information about the lifecycle of the different *Fast DDS* versions (and their corresponding counterpart in this repository), please refer to the [release support section of the Fast DDS repository](https://github.com/eProsima/Fast-DDS/blob/master/RELEASE_SUPPORT.md).
eProsima-Fast-CDR-39b861f/VERSIONING.md 0000664 0000000 0000000 00000001030 15102103421 0017122 0 ustar 00root root 0000000 0000000 Versioning policy declaration
=============================
Starting on v1.0.15, the version numbers for this library will adhere to the versioning policies defined by [Semantic Versioning](https://semver.org/).
This means that API breaks should only happen between major version changes.
If an ABI break is required, it should be done between minor versions, and it should be clearly stated on the release notes.
The changes included on each version can be found in the [release notes](https://github.com/eProsima/Fast-CDR/releases) eProsima-Fast-CDR-39b861f/cmake/ 0000775 0000000 0000000 00000000000 15102103421 0016203 5 ustar 00root root 0000000 0000000 eProsima-Fast-CDR-39b861f/cmake/common/ 0000775 0000000 0000000 00000000000 15102103421 0017473 5 ustar 00root root 0000000 0000000 eProsima-Fast-CDR-39b861f/cmake/common/check_configuration.cmake 0000664 0000000 0000000 00000020760 15102103421 0024506 0 ustar 00root root 0000000 0000000 # Copyright 2016 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.
# get_set_stdcxx() checks and sets the compiler standard level
# stdversion: the level of standard fullfilment
# stdfeature: the feature name associated with that level
# gcc_flag: the gcc/clang flag for fallback
# cl_flag: the cl flag for fallback
# force: if the user should enforced this standard level or not (FORCE_CXX)
# result: a return variable to check if this level is available
function(get_set_stdcxx stdversion stdfeature gcc_flag cl_flag force result)
set(${result} 0 PARENT_SCOPE)
# check if CMake feature management is available
get_property(CXX_KNOWN_FEATURES GLOBAL PROPERTY CMAKE_CXX_KNOWN_FEATURES)
if((stdfeature IN_LIST CXX_KNOWN_FEATURES) AND NOT ("run_fallback_test" IN_LIST ARGV))
# CMake is aware let's check if is available
if(force AND (stdfeature IN_LIST CMAKE_CXX_COMPILE_FEATURES))
# is available report and enforce as commanded
# avoid using CACHE variables to avoid polute projects that use this repo as subdir
set(CMAKE_CXX_STANDARD ${stdversion} PARENT_SCOPE)
set(${result} 1 PARENT_SCOPE)
message(STATUS "Enforced ${stdfeature} CMake feature")
elseif(force)
message(FATAL_ERROR "The specified C++ ${stdfeature} feature is not supported using default compiler.")
endif()
else()
# fallback to the old behaviour
include(CheckCXXCompilerFlag)
if(gcc_flag AND (
CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG OR
CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR
CMAKE_CXX_COMPILER_ID MATCHES "QCC"))
# check using gcc/clang flags
check_cxx_compiler_flag(${gcc_flag} SUPPORTS_${stdfeature})
if(SUPPORTS_${stdfeature} AND force)
add_compile_options($<$:${gcc_flag}>)
set(${result} 1 PARENT_SCOPE)
message(STATUS "Enforced ${gcc_flag} CMake feature")
elseif((NOT SUPPORTS_${stdfeature}) AND force)
message(FATAL_ERROR "Force to support ${stdfeature} but not supported by gnu compiler")
endif()
elseif(cl_flag AND (MSVC OR MSVC_IDE))
# check using cl flags
check_cxx_compiler_flag(${cl_flag} SUPPORTS_${stdfeature})
if(SUPPORTS_${stdfeature} AND force)
add_compile_options($<$:${cl_flag}>)
set(${result} 1 PARENT_SCOPE)
message(STATUS "Enforced ${cl_flag} CMake feature")
elseif((NOT SUPPORTS_${stdfeature}) AND force)
message(FATAL_ERROR "Force to support ${stdfeature} but not supported by MSVC")
endif()
elseif(force)
message(WARNING "The specified C++ ${stdfeature} feature is not supported using default compiler.")
endif()
endif()
endfunction()
function(check_stdcxx enforced_level)
# Map force values to cmake features
set(cxx_levels 23 20 17 14 1Y 11)
set(cxx_features cxx_std_23 cxx_std_20 cxx_std_17 cxx_std_14 NOTFOUND cxx_std_11)
set(gcc_flags -std=c++23 -std=c++20 -std=c++17 -std=c++14 -std=c++1y -std=c++11)
set(cl_flags /std:c++23 /std:c++20 /std:c++17 /std:c++14 NOTFOUND NOTFOUND)
set(HAVE_CXX HAVE_CXX23 HAVE_CXX20 HAVE_CXX17 HAVE_CXX14 HAVE_CXX1Y HAVE_CXX11)
# Traverse the collection
while(cxx_levels)
# pop current values
list(POP_FRONT cxx_levels level)
list(POP_FRONT cxx_features feature)
list(POP_FRONT gcc_flags gcc_flag)
list(POP_FRONT cl_flags cl_flag)
list(POP_FRONT HAVE_CXX preprocessor_flag)
# check if we must enforce this one
if(enforced_level STREQUAL level)
set(force TRUE)
else()
set(force FALSE)
endif()
# testing framework awareness
set(test)
if("run_fallback_test" IN_LIST ARGV)
set(test "run_fallback_test")
endif()
# check
get_set_stdcxx(${level} ${feature} ${gcc_flag} ${cl_flag} ${force} result ${test})
if(result)
# we are done, mark all levels below as available
set(${preprocessor_flag} 1 PARENT_SCOPE)
# upload local variable fixed by get_set_stdcxx
set(CMAKE_CXX_STANDARD ${CMAKE_CXX_STANDARD} PARENT_SCOPE)
while(HAVE_CXX)
list(POP_FRONT HAVE_CXX preprocessor_flag)
set(${preprocessor_flag} 1 PARENT_SCOPE)
endwhile()
break()
else()
# If the user doesn't enforce this level the macros are not trustworthy
set(${preprocessor_flag} 0 PARENT_SCOPE)
endif()
endwhile()
endfunction()
macro(check_type_sizes)
include(CheckTypeSize)
check_type_size("long double" TYPE_LONG_DOUBLE LANGUAGE CXX)
set(FASTCDR_SIZEOF_LONG_DOUBLE ${TYPE_LONG_DOUBLE})
check_type_size("__float128" TYPE_FLOAT128 LANGUAGE CXX)
if(HAVE_TYPE_FLOAT128)
set(FASTCDR_HAVE_FLOAT128 1)
else()
set(FASTCDR_HAVE_FLOAT128 0)
endif()
endmacro()
macro(check_endianness)
if(CMAKE_CXX_BYTE_ORDER)
if(CMAKE_CXX_BYTE_ORDER STREQUAL "BIG_ENDIAN")
set(FASTCDR_IS_BIG_ENDIAN_TARGET 1)
else()
set(FASTCDR_IS_BIG_ENDIAN_TARGET 0)
endif()
else()
# Test endianness
include(TestBigEndian)
test_big_endian(BIG_ENDIAN)
set(FASTCDR_IS_BIG_ENDIAN_TARGET ${BIG_ENDIAN})
endif()
endmacro()
macro(check_msvc_arch)
if(MSVC_VERSION EQUAL 1700)
if(CMAKE_CL_64)
set(MSVC_ARCH "x64Win64VS2012")
else()
set(MSVC_ARCH "i86Win32VS2012")
endif()
elseif(MSVC_VERSION EQUAL 1800)
if(CMAKE_CL_64)
set(MSVC_ARCH "x64Win64VS2013")
else()
set(MSVC_ARCH "i86Win32VS2013")
endif()
elseif(MSVC_VERSION EQUAL 1900)
if(CMAKE_CL_64)
set(MSVC_ARCH "x64Win64VS2015")
else()
set(MSVC_ARCH "i86Win32VS2015")
endif()
elseif(MSVC_VERSION GREATER 1900)
if(CMAKE_CL_64)
set(MSVC_ARCH "x64Win64VS2017")
else()
set(MSVC_ARCH "i86Win32VS2017")
endif()
else()
if(CMAKE_CL_64)
set(MSVC_ARCH "x64Win64VSUnknown")
else()
set(MSVC_ARCH "i86Win32VSUnknown")
endif()
endif()
endmacro()
function(set_common_compile_options target)
enable_language(C)
enable_language(CXX)
if(MSVC OR MSVC_IDE)
target_compile_options(${target} PRIVATE /W4)
else()
target_compile_options(${target} PRIVATE -Wall
-Wextra
-Wshadow
$<$:-Wnon-virtual-dtor>
-pedantic
-Wcast-align
-Wunused
$<$:-Woverloaded-virtual>
-Wconversion
-Wsign-conversion
$<$:-Wlogical-op>
$<$,$>:-Wuseless-cast>
-Wdouble-promotion
$<$:-Wold-style-cast>
$<$,$,6.0.0>>>,$,$,6.0.0>>>>:-Wnull-dereference>
$<$,$,7.0.0>>>,$,$,7.0.0>>>>:-Wduplicated-branches>
$<$,$,6.0.0>>>,$,$,6.0.0>>>>:-Wduplicated-cond>
$<$,$,7.0.0>>>,$,$,7.0.0>>>>:-Wrestrict>
)
endif()
endfunction()
eProsima-Fast-CDR-39b861f/cmake/common/find_or_add_gtest.cmake 0000664 0000000 0000000 00000002743 15102103421 0024141 0 ustar 00root root 0000000 0000000 # Copyright 2024 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.
macro(find_or_add_gtest)
# Check if building on an ament context, i.e. ROS 2
# Thanks to https://github.com/facontidavide/PlotJuggler/blob/main/CMakeLists.txt#L66
find_package(ament_cmake QUIET)
# This is a ROS 2 build
if(ament_cmake_FOUND)
# Find all GTest vendor required packages
find_package(ament_cmake REQUIRED)
find_package(gtest_vendor REQUIRED)
find_package(ament_cmake_gtest REQUIRED)
# Find GTest
ament_find_gtest()
# Add aliases for GTest libraries so we can use them as targets independently of the context
add_library(GTest::gtest ALIAS gtest)
add_library(GTest::gtest_main ALIAS gtest_main)
target_link_libraries(gtest_main gtest)
# This is a non-ROS 2 build
else()
# Find GTest normally
find_package(GTest CONFIG REQUIRED)
endif()
endmacro()
eProsima-Fast-CDR-39b861f/cmake/packaging/ 0000775 0000000 0000000 00000000000 15102103421 0020127 5 ustar 00root root 0000000 0000000 eProsima-Fast-CDR-39b861f/cmake/packaging/Config.cmake.in 0000664 0000000 0000000 00000005444 15102103421 0022752 0 ustar 00root root 0000000 0000000 # Copyright 2016 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.
set(@PROJECT_NAME@_VERSION @PROJECT_VERSION@)
@PACKAGE_INIT@
@FASTCDR_PACKAGE_OPT_BIN_DIR_CONDITION@
set_and_check(@PROJECT_NAME@_BIN_DIR "@PACKAGE_BIN_INSTALL_DIR@")
endif()
set_and_check(@PROJECT_NAME@_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@")
set_and_check(@PROJECT_NAME@_LIB_DIR "@PACKAGE_LIB_INSTALL_DIR@")
set(fastcdr_known_comps static shared)
set(fastcdr_comp_static NO)
set(fastcdr_comp_shared NO)
foreach (fastcdr_comp IN LISTS ${CMAKE_FIND_PACKAGE_NAME}_FIND_COMPONENTS)
if (fastcdr_comp IN_LIST fastcdr_known_comps)
set(fastcdr_comp_${fastcdr_comp} YES)
else ()
set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE
"fastcdr does not recognize component `${fastcdr_comp}`.")
set(${CMAKE_FIND_PACKAGE_NAME}_FOUND FALSE)
return()
endif ()
endforeach ()
if (fastcdr_comp_static AND fastcdr_comp_shared)
set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE
"fastcdr `static` and `shared` components are mutually exclusive.")
set(${CMAKE_FIND_PACKAGE_NAME}_FOUND FALSE)
return()
endif ()
set(fastcdr_static_targets "${CMAKE_CURRENT_LIST_DIR}/fastcdr-static-targets.cmake")
set(fastcdr_shared_targets "${CMAKE_CURRENT_LIST_DIR}/fastcdr-shared-targets.cmake")
macro(fastcdr_load_targets type)
if (NOT EXISTS "${fastcdr_${type}_targets}")
set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE
"fastcdr `${type}` libraries were requested but not found.")
set(${CMAKE_FIND_PACKAGE_NAME}_FOUND FALSE)
return()
endif ()
include("${fastcdr_${type}_targets}")
endmacro()
if (fastcdr_comp_static)
fastcdr_load_targets(static)
elseif (fastcdr_comp_shared)
fastcdr_load_targets(shared)
elseif (DEFINED fastcdr_SHARED_LIBS AND fastcdr_SHARED_LIBS)
fastcdr_load_targets(shared)
elseif (DEFINED fastcdr_SHARED_LIBS AND NOT fastcdr_SHARED_LIBS)
fastcdr_load_targets(static)
elseif (BUILD_SHARED_LIBS)
if (EXISTS "${fastcdr_shared_targets}")
fastcdr_load_targets(shared)
else ()
fastcdr_load_targets(static)
endif ()
else ()
if (EXISTS "${fastcdr_static_targets}")
fastcdr_load_targets(static)
else ()
fastcdr_load_targets(shared)
endif ()
endif ()
eProsima-Fast-CDR-39b861f/cmake/testing/ 0000775 0000000 0000000 00000000000 15102103421 0017660 5 ustar 00root root 0000000 0000000 eProsima-Fast-CDR-39b861f/cmake/testing/GoogleTest.cmake 0000664 0000000 0000000 00000002320 15102103421 0022733 0 ustar 00root root 0000000 0000000 # Copyright 2023 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.
include(GoogleTest)
function(gtest_discover_tests TARGET)
cmake_minimum_required(VERSION 3.22)
if (WIN32)
add_custom_command(
TARGET ${TARGET} POST_BUILD
COMMAND ${CMAKE_COMMAND} -DTARGET=${TARGET} -DCONFIG=$ -DRUNTIME_LIST=$ -P ${CMAKE_SOURCE_DIR}/cmake/testing/generate_google_test_win_wrapper.cmake
COMMAND_EXPAND_LISTS
VERBATIM
)
set(CMAKE_COMMAND "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_win_wrapper_$.bat")
endif()
_gtest_discover_tests(${TARGET} ${ARGN})
endfunction()
eProsima-Fast-CDR-39b861f/cmake/testing/generate_google_test_win_wrapper.cmake 0000664 0000000 0000000 00000002603 15102103421 0027465 0 ustar 00root root 0000000 0000000 # Copyright 2023 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.
if (NOT DEFINED TARGET)
message(FATAL_ERROR "This scrips needs TARGET variable set")
endif()
if (NOT DEFINED CONFIG)
message(FATAL_ERROR "This scrips needs CONFIG variable set")
endif()
if (NOT DEFINED RUNTIME_LIST)
message(FATAL_ERROR "This scrips needs RUNTIME_LIST variable set")
endif()
set(_path "")
foreach(_runtime_dll IN LISTS RUNTIME_LIST)
cmake_path(GET _runtime_dll PARENT_PATH _runtime_dll_path)
cmake_path(NATIVE_PATH _runtime_dll_path _runtime_dll_path_native)
list(APPEND _path "${_runtime_dll_path_native}")
endforeach()
list(REMOVE_DUPLICATES _path)
cmake_path(NATIVE_PATH CMAKE_COMMAND _cmake_command)
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_win_wrapper_${CONFIG}.bat" "
@ECHO OFF
set \"PATH=${_path};%PATH%\"
\"${_cmake_command}\" %*
")
eProsima-Fast-CDR-39b861f/colcon.pkg 0000664 0000000 0000000 00000000317 15102103421 0017104 0 ustar 00root root 0000000 0000000 name: fastcdr
type: cmake
dependencies:
# Needed for test compilation in ROS 2 CI
- ament_cmake_gtest
- ament_cmake
# Needed for test compilation in eProsima CI
- googletest-distribution
eProsima-Fast-CDR-39b861f/doc/ 0000775 0000000 0000000 00000000000 15102103421 0015670 5 ustar 00root root 0000000 0000000 eProsima-Fast-CDR-39b861f/doc/README.html.in 0000664 0000000 0000000 00000565753 15102103421 0020145 0 ustar 00root root 0000000 0000000
Available documentation:
Local:
Online (updated frequently):
Copyright© 2019 eProsima. All rights reserved.
This copy of eProsima Fast CDR is licensed to you under the terms described in the LICENSE file included in this distribution.
eProsima-Fast-CDR-39b861f/doc/Users Manual.odt 0000664 0000000 0000000 00000076254 15102103421 0020715 0 ustar 00root root 0000000 0000000 PK 1JB^2' ' mimetypeapplication/vnd.oasis.opendocument.textPK 1JB - Pictures/100002010000012C0000004EAA7FB6AE.pngW_ƗCJ[.ErAeIAX$y_9;wΝ{f|yEpi@(:S]FI80EmLCwBAv\$xX{xCݬ@vPMk
ꃒOo]bʾl3bV=yݎ Һ=HBAA9[|l/4yү;sVM܂|/;^.Fi4s8(z*Xڎ6T?TȚ
[ `ʼ;s4܈{亠ϕpk[IsrR%J2o#MKUR!yyfL"ѸX?NOAq(Z{)$JyBJkɻ 5uʶ߲); פaM+15A^; IJKk$YDZ [8\B,̆:ޖ;o+v]DB)-\P<X 0or-[ۺe`R r"uQrOI4K)^8Y>K@F;8(?fGF~j[v#8tQ51w&)S8ɷz5T|)wl<$=}߅G:$NjTvg,AT藕dfG Ѹ6u}c#ǚ]n}N
{K~aPKC/hd3.ʭC5_oZ#?S[!ʼnRuÈH=q(lfG*HMjW묞Tˈ":`<muiRc\knѱvIZwNd)HeV\}9à=;$1$}bj4gsݖ&Ů