Installation instructions

Installing from package

Arch Linux based distributions

Arch linux users can use the exec-helper (AUR) package or checkout the exec-helper-package project for building the package from source.

Debian based distributions

Add the PPA on Launchpad to your sources or checkout the exec-helper-package project for building the package from source.

Other distributions

Checkout the Building from source section.

Building from source

Requirements

Build tools

  • A C++ 17 compatible compiler. Tested with: g++, clang++ and MSVC 2017 (14.1)
  • cmake (3.15 or newer)
  • make or ninja
  • make for the quick install
  • Sphinx for generating man-pages and general documentation
  • Doxygen (1.8.15 or newer) for building API documentation (optional)
  • gitchangelog for building the changelog (optional)

Build dependencies

  • POSIX compliant operating system
  • boost-program-options (1.64 or newer) development files
  • boost-log (1.64 or newer) development files
  • yaml-cpp (0.5.3 or newer) development files (optional, will be downloaded and compiled in statically if missing)
  • Microsoft gsl development files (optional, will be downloaded and compiled in statically if missing)
  • luaJIT development files (optional, will be downloaded an compiled in statically if missing)

Quick installation

$ make
$ sudo make install

Use

$ make help

for an overview of the available quick installation targets and for an overview of the (very limited) available configuration options.

Advanced installation

CMake is the build system. The Makefile mentioned in the quick installation is a simple wrapper around a more complex - and more configurable - CMake invocation.

It has the following project-specific configuration options:

USE_SYSTEM_YAML_CPP

Use the yaml-cpp library installed on the system. If switched off, the library will be automatically installed locally during the build. Default: auto

USE_SYSTEM_LUAJIT

Use the luaJIT library installed on the system. If switched off, the library will be automatically installed locally during the build. Default: auto

USE_SYSTEM_GSL

Use the Microsoft gsl library installed on the system. If switched off, the library will be automaically installed locally during the build. Default: auto

POSITION_INDEPENDENT_CODE

Build using position independent code. Default: ON

ENABLE_TESTING

Enable building the testing infrastructure. Default: ON

BUILD_MAN_DOCUMENTATION

Generate the man-pages for this project

BUILD_HTML_DOCUMENTATION

Generate the HTML documentation for this project

BUILD_XML_DOCUMENTATION

Generate the XML documentation for this project

Build tests

Testing is enabled by setting the CMake configuration option ENABLE_TESTING to ON.

The tests require, in addition to all dependencies above, the following dependencies:

  • Catch2 unittest framework development files (optional, for building the tests)
  • Rapidcheck property based unittest framework development files (optional, for building the tests)

Testing related configuration options:

ENABLE_WERROR

Enable warning as error during compilation (only supported for GCC and clang)

LIMITED_OPTIMIZATION

Build with limited optimization (typically -O1, only supported for GCC and clang). This is typically used for running tools like valgrind.

TERMINATE_ON_ASSERT_FAILURE

Explicitly terminate when an assert fires.

USE_SYSTEM_CATCH

Use the Catch2 library installed on the system. If switched off, the library will be automatically installed locally during the build. Default: auto

USE_SYSTEM_RAPIDCHECK

Use the Rapidcheck library installed on the system. If switched off, the library will be automatically installed locally during the build. Default: auto

Cross compilation

Exec-helper supports both native and cross compilation (including building with a custom sysroot) builds. Cross compilation requires invoking cmake directly and appending -DCMAKE_TOOLCHAIN_FILE=<toolchain-file> to the cmake initialization command. Check the toolchain.cmake.in file for a template on setting up the toolchain file for cross compilation and the Makefile for a template of the cmake initialization command.