CMake options

// Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel ...
CMAKE_BUILD_TYPE:STRING=

// Install path prefix, prepended onto install directories.
CMAKE_INSTALL_PREFIX:PATH=/usr/local

// Build DLT backend plugin
ELOSD_EVENTLOGGING_BACKEND_DLT:BOOL=ON

// Build InfluxDB backend plugin
ELOSD_EVENTLOGGING_BACKEND_INFLUXDB:BOOL=OFF

// Build NoSQL backend plugin
ELOSD_EVENTLOGGING_BACKEND_NOSQL:BOOL=OFF

// Build sqlite3 bakend plugin
ELOSD_EVENTLOGGING_BACKEND_SQL:BOOL=ON

// Build libelosdlt, a dlt protocol implementation.
ELOSD_LIBDLT:BOOL=ON

// enable all default builds
ELOS_BUILD_DEFAULTS:BOOL=ON

// build libelos_common
ELOS_COMMON:BOOL=ON

// Build elosd
ELOS_DAEMON:BOOL=ON

// Build the elos demos
ELOS_DEMOS:BOOL=ON

// build libelos
ELOS_LIBRARY:BOOL=ON

// build libelos-cpp
ELOS_LIBRARY_CPP:BOOL=ON

// build libelos-lite
ELOS_LIBRARY_LITE:BOOL=OFF

// Build the mock libraries
ELOS_MOCK_LIBRARY:BOOL=OFF

// Build the elos plugins
ELOS_PLUGINS:BOOL=ON

// build libelosplugin
ELOS_PLUGIN_LIBRARY:BOOL=ON

// Build elosc and other tools
ELOS_TOOLS:BOOL=ON

// Build with -fanalyzer
ENABLE_ANALYZER:BOOL=ON

// Link with ASAN
ENABLE_ASAN:BOOL=ON

// Use CI mode for building
ENABLE_CI:BOOL=OFF

// Enable the git hash for the version
ENABLE_GIT_VERSION:BOOL=ON

// Install elosd
INSTALL_ELOS_DAEMON:BOOL=ON

// Install the elos demos
INSTALL_ELOS_DEMOS:BOOL=ON

// Install the mock libraries
INSTALL_ELOS_MOCK_LIBRARY:BOOL=ON

// install the elos plugins
INSTALL_ELOS_PLUGINS:BOOL=ON

// Install elosc and other tools
INSTALL_ELOS_TOOLS:BOOL=ON

// Install unit tests
INSTALL_UNIT_TESTS:BOOL=ON

// Path to a program.
PANDOC:FILEPATH=PANDOC-NOTFOUND

// Path to a program.
PLANTUML:FILEPATH=/usr/bin/plantuml

// Build unit tests
UNIT_TESTS:BOOL=ON

// The directory containing a CMake configuration file for cmocka.
cmocka_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/cmocka

// The directory containing a CMake configuration file for cmocka_extensions.
cmocka_extensions_DIR:PATH=/usr/local/lib/cmake/cmocka_extensions

// The directory containing a CMake configuration file for cmocka_mocks.
cmocka_mocks_DIR:PATH=/usr/local/lib/cmake/cmocka_mocks

// The directory containing a CMake configuration file for json-c.
json-c_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/json-c

// The directory containing a CMake configuration file for safu.
safu_DIR:PATH=/usr/local/lib/cmake/safu

// The directory containing a CMake configuration file for samconf.
samconf_DIR:PATH=/usr/local/lib/cmake/samconf

Usage of find_package

  • Always specify a version. find_package(dependecy X.Y.Z REQUIRED)

  • Specify the version used for development

  • The version doesn’t guarantee that in the future the build still works with this version.

  • The version does not necessarily say the previous versions will not work.

  • The version is just an indicator for later issue or bug tracking, to say: “It was developed with this version and it worked”.

  • Usually we always build against the latest available version of our dependencies, so we only can guarantee that the latest upstream version will work.