6. 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.

6.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

Possible values

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.

ON OFF

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.

  • COMPILE_EXAMPLES is set to ON if EPROSIMA_INSTALLER is OFF.

  • THIRDPARTY_fastcdr is set to ON if it was not set to FORCE.

  • THIRDPARTY_Asio is set to ON if it was not set to FORCE.

  • THIRDPARTY_TinyXML2 is set to ON if it was not set to FORCE.

  • THIRDPARTY_android-ifaddrs is set to ON if it was not set to FORCE.

  • 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.

ON 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 OFF

ON

SECURITY

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

ON OFF

OFF

NO_TLS

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

ON OFF

OFF

SHM_TRANSPORT_DEFAULT

Adds Shared Memory transport (SHM) to the default transports. Please refer to SHM section
for more information on Fast DDS SHM transport.

ON OFF

ON

FASTDDS_STATISTICS

Enables the Fast DDS Statistics module. Please refer to Statistics Module for more
information on this module.

ON OFF

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.

ON OFF

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.

ON OFF

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.

ON OFF

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.

ON OFF

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.

ON OFF

OFF

SQLITE3_SUPPORT

Builds the SQLITE3 Plugin, which enables the TRANSIENT_DURABILITY_QOS
and PERSISTENT_DURABILITY_QOS options for the DurabilityQosPolicyKind
and therefore the Persistence Service.

ON OFF

ON

6.2. Log options

Fast DDS uses its own configurable Log module with different verbosity levels. Please, refer to Logging section for more information.

This module can be configured using Fast DDS CMake arguments regarding the following options.

Option

Description

Possible values

Default

LOG_CONSUMER_DEFAULT

Selects the default log consumer for the logging module.
AUTO has the same behavior as STDOUT.
For more information, please refer to Log consumers.

AUTO STDOUT
STDOUTERR

AUTO

LOG_NO_INFO

Deactivates Info Log level.
If Fast DDS is built in debug mode for Single-Config generators,
the default value will be OFF.

ON OFF

ON

FASTDDS_ENFORCE_LOG_INFO

Enables Info Log level even on non Debug configurations.
This option only takes action if LOG_NO_INFO is set to OFF
(see Disable Logging Module).
Mind that this may entail a significant performance hit.

ON OFF

OFF

LOG_NO_WARNING

Deactivates Warning Log level.

ON OFF

OFF

LOG_NO_ERROR

Deactivates Error Log level.

ON OFF

OFF

INTERNAL_DEBUG

Activates compilation of log messages (See Disable Logging Module).
Moreover, INTERNAL_DEBUG is set to ON if
EPROSIMA_BUILD is ON.

ON OFF

OFF

6.3. 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

Possible values

Default

THIRDPARTY_fastcdr

ON activates the use of the internal Fast CDR third-party library if it is not
found elsewhere in the system.
FORCE activates the use of the internal Fast CDR third-party library
regardless of whether it can be found elsewhere in the system.
OFF deactivates the use of the internal Fast CDR third-party library.
If it is not set to FORCE, it is set to ON if EPROSIMA_BUILD is ON.

ON OFF FORCE

OFF

THIRDPARTY_Asio

ON activates the use of the internal Asio third-party library if it is not
found elsewhere in the system.
FORCE activates the use of the internal Asio third-party library
regardless of whether it can be found elsewhere in the system.
OFF deactivates the use of the internal Asio third-party library.
If it is not set to FORCE, it is set to ON if EPROSIMA_BUILD is ON.

ON OFF FORCE

OFF

THIRDPARTY_TinyXML2

ON activates the use of the internal TinyXML2 third-party library if it is not
found elsewhere in the system.
FORCE activates the use of the internal TinyXML2 third-party library
regardless of whether it can be found elsewhere in the system.
OFF deactivates the use of the internal TinyXML2 third-party library.
If it is not set to FORCE, it is set to ON if EPROSIMA_BUILD is ON.

ON OFF FORCE

OFF

THIRDPARTY_android-ifaddrs

android-ifaddrs is an implementation of getifaddrs() for Android.
Only used if ANDROID is 1.
ON activates the use of the internal android-ifaddrs third-party library if it is not
found elsewhere in the system.
FORCE activates the use of the internal android-ifaddrs third-party library
regardless of whether it can be found elsewhere in the system.
OFF deactivates the use of the internal android-ifaddrs third-party library.
If it is not set to FORCE, it is set to ON if EPROSIMA_BUILD is ON.

ON OFF FORCE

OFF

THIRDPARTY

Unless they are otherwise specified, sets value of all third-party
git submodules THIRDPARTY_fastcdr, THIRDPARTY_Asio,
THIRDPARTY_TinyXML2, and THIRDPARTY_android-ifaddrs.

ON OFF FORCE

OFF

THIRDPARTY_UPDATE

Activates the update of all third-party git submodules.

ON OFF

ON

Note

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

6.4. 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

Possible values

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.

ON OFF

OFF

EPROSIMA_GTEST

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

ON OFF

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.

ON OFF

OFF

FASTRTPS_API_TESTS

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

ON OFF

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.

ON OFF

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.

ON OFF

OFF

PROFILING_TESTS

Activates the building of profiling tests using Valgrind.

ON OFF

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.

ON OFF

OFF

VIDEO_TESTS

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

ON OFF

OFF

DISABLE_UDPV6_TESTS

Disables UDPv6 tests.

ON OFF

OFF