5. CMake options

eProsima Fast DDS provides numerous CMake options for changing the behavior and configuration of Fast DDS. These options allow the user to enable/disable certain Fast DDS settings by defining these options to ON/OFF at the CMake execution. This section is structured as follows: first, the CMake options for the general configuration of Fast DDS are described; then, the options related to the third party libraries are presented; finally, the possible options for the building of Fast DDS tests are defined.

5.1. General options

The Fast DDS CMake options for configuring general settings are shown below, together with their description and dependency on other options.

Option

Description

Default

EPROSIMA_INSTALLER

Creates a build for Windows binary installers. Specifically it adds to the list of
components to install (CPACK_COMPONENTS_ALL) the libraries corresponding
to the Microsoft Visual C++ compiler (MSVC). Setting EPROSIMA_INSTALLER
to ON has the following effects on other options:

  • EPROSIMA_BUILD is set to ON.

  • BUILD_DOCUMENTATION is set to ON.

  • INSTALL_EXAMPLES is set to ON.

OFF

EPROSIMA_BUILD

Activates internal Fast DDS builds. It is set to ON if EPROSIMA_INSTALLER is ON.
Setting EPROSIMA_BUILD to ON has the following effects on other options:

  • INTERNAL_DEBUG is set to ON.

  • SHM_TRANSPORT_DEFAULT is set to ON and EPROSIMA_INSTALLER is set to OFF.

  • COMPILE_EXAMPLES is set to ON if EPROSIMA_INSTALLER is OFF.

  • THIRDPARTY is set to ON.

  • EPROSIMA_GTEST is set to ON if GoogleTest (GTest) library was found.

  • EPROSIMA_GMOCK is set to ON if GoogleMock (GMock) library was found.

  • EPROSIMA_BUILD_TESTS is set to ON if EPROSIMA_INSTALLER is OFF.

OFF

BUILD_SHARED_LIBS

Builds internal libraries as shared libraries, i.e. cause add_library() CMake function
to create shared libraries if on. All libraries are built shared unless the library was
explicitly added as a static library.

ON

SECURITY

Activates the Fast DDS security module. Please refer to Security for more information
on security module.

OFF

NO_TLS

Disables Transport Layer Security (TLS) Support. Please refer to TLS over TCP for
more information on Fast DDS TLS configuration.

OFF

SHM_TRANSPORT_DEFAULT

Adds Shared Memory transport (SHM) to the default transports. It is set to ON if
EPROSIMA_BUILD is ON. Please refer to SHM section for more information
on Fast DDS SHM transport.

OFF

COMPILE_EXAMPLES

Builds the Fast DDS examples. It is set to ON if EPROSIMA_BUILD is ON and
EPROSIMA_INSTALLER is OFF. These examples can be found in the eProsima Fast DDS
GitHub repository.

OFF

INSTALL_EXAMPLES

Installs the Fast DDS examples, i.e. adds the Fast DDS examples to the list of
components to install (CPACK_COMPONENTS_ALL). It is set to ON if
EPROSIMA_INSTALLER is ON.

OFF

BUILD_DOCUMENTATION

Uses doxygen to create the Fast DDS API reference documentation. It is set to ON
if EPROSIMA_INSTALLER is ON or if CHECK_DOCUMENTATION is ON.

OFF

CHECK_DOCUMENTATION

Downloads Fast DDS documentation from Read the Docs media servers. The
documentation files are extracted in the doc/manual directory, updating
any previous version already downloaded.
If CHECK_DOCUMENTATION is ON, BUILD_DOCUMENTATION is set to ON.

OFF

STRICT_REALTIME

Enables a strict real-time behaviour. Please refer to the Real-Time Use Case for
more information on Fast DDS real-time configuration.

OFF

INTERNAL_DEBUG

Activates Log::Kind::Info debug messages (See Logging).
For this option to have any effect, i.e. to print the information messages,
Fast DDS must be debug built. This is done by setting the CMAKE_BUILD_TYPE
option to Debug. Moreover, INTERNAL_DEBUG is set to ON if
EPROSIMA_BUILD is ON.

OFF

5.1.1. Third-party libraries options

Fast DDS relies on the eProsima FastCDR library for serialization mechanisms. Moreover, Fast DDS requires two external dependencies for its proper operation: Asio and TinyXML2. Asio is a cross-platform C++ library for network and low-level I/O programming, while TinyXML2 parses the XML profile files, so Fast DDS can use them (see XML profiles). These three libraries (eProsima FastCDR, Asio and TinyXML2) can be installed by the user, or downloaded on the Fast DDS build. In the latter case, they are referred to as Fast DDS internal third-party libraries. This can be done by setting either THIRDPARTY or EPROSIMA_BUILD to ON.

These libraries can also be configured using Fast DDS CMake options.

Option

Description

Default

THIRDPARTY

Activates the use of Fast CDR and the internal third-party libraries. It is set to ON
if EPROSIMA_BUILD is ON.

OFF

THIRDPARTY_UPDATE

Activates the automatic update of just Fast CDR library.

ON

THIRDPARTY_fastcdr

Links against the internal Fast CDR library.

OFF

THIRDPARTY_Asio

Links against the internal Asio internal third-party library.

OFF

THIRDPARTY_TinyXML2

Links against the internal TinyXML2 internal third-party library.

OFF

THIRDPARTY_android-ifaddrs

Links against the internal android-ifaddrs, an implementation of getifaddrs()
for Android. Only if ANDROID is ON.

OFF

Note

ANDROID is a CMake environment variable that is set to 1 if the target system (CMAKE_SYSTEM_NAME) is Android.

5.1.2. Test options

eProsima Fast DDS comes with a full set of tests for continuous integration. The types of tests are: unit tests, black-box tests, performance tests, profiling tests, and XTypes tests. The building and execution of these tests is specified by the Fast DDS CMake options shown in the table below.

Option

Description

Default

GTEST_INDIVIDUAL

Activate the individual building of GoogleTest tests, since Fast DDS tests are
implemented using the GoogleTest framework. However, the test are compiled
if EPROSIMA_BUILD is set to ON. Therefore, if GTEST_INDIVIDUAL is OFF and
EPROSIMA_BUILD is ON, the tests are processed as a single major test.

OFF

EPROSIMA_GTEST

Activates special set of GTEST_ROOT, i.e. the root directory of the GoogleTest
installation.

OFF

EPROSIMA_GMOCK

Activates special set of GMOCK_ROOT, i.e. the root directory of the GoogleTest C++
mocking framework installation. In the latest version of GoogleTest, GoogleMock is
integrated into it.

OFF

FASTRTPS_API_TESTS

Enables the building of black-box tests for the verification of RTPS communications
using the Fast DDS RTPS-layer API.

OFF

FASTDDS_PIM_API_TESTS

Enables the building of black-box tests for the verification of DDS communications
using the Fast DDS DDS-layer API.

OFF

PERFORMANCE_TESTS

Activates the building of performance tests, except for the video test, which requires
both PERFORMANCE_TESTS and VIDEO_TESTS to be set to ON.

OFF

PROFILING_TESTS

Activates the building of profiling tests using Valgrind.

OFF

EPROSIMA_BUILD_TESTS

Activates the building of black-box, unit, xtypes, RTPS communication and
DDS communication tests. It is set to ON if EPROSIMA_BUILD is ON and EPROSIMA_INSTALLER
is OFF.

OFF

VIDEO_TESTS

If PERFORMANCE_TESTS is ON, it will activate the building of video performance tests.

OFF

DISABLE_UDPV6_TESTS

Disables UDPv6 tests.

OFF