1. Installation

1.1. From a Git Repository

After a checkout of the desired version, do:

./bootstrap.sh

This is needed to generate build files, extract the API documentation, and create the file VERSION based on the current commit.

See From a Source Archive on how to then build the package.

1.2. As Dependency of Another CMake Project

PermGroup supports use via add_subdirectory in CMake. The target PermGroup::perm_group is exported, which can be used with target_link_libraries. The version is variable in the variable PermGroup_VERSION. Note that running ./bootstrap.sh is still needed if the source is a repository clone (e.g., a Git submodule).

1.3. From a Source Archive

The package is build and installed from source as a CMake project. Generally that means something like:

mkdir build
cd build
cmake ../ <options>
make -j <n>
make install

A source archive can also be created with make dist.

The following is a list of commonly used options for cmake, and additional options specific for PermGroup.

  • -DCMAKE_INSTALL_PREFIX=<prefix>, set a non-standard installation directory. Note also that the GNUInstallDirs module is used.

  • -DCMAKE_BUILD_TYPE=<build type>, set a non-standard build type. The default is RelWithDebInfo. An additional build type OptDebug is available which adds the compilation flags -g -O3.

  • -DBUILD_DOC=on, whether to build documentation or not. This is forced to off when used via add_subdirectory.

  • -DBUILD_TESTING=off, whether to allow test building or not. This is forced to off when used via add_subdirectory. When on the tests can be build with make tests and run with ctest.

  • -DBUILD_TESTING_SANITIZERS=on, whether to compile tests with sanitizers or not. This has no effect with code coverage is enabled.

  • -DBUILD_COVERAGE=off, whether to compile code and run tests with GCov. When on the sanitizers on tests will be disabled. After building the tests, execute make coverage_collect without parallel jobs to run tests. Afterwards, execute make coverage_build to compile the code coverage report.

1.4. Dependencies

  • This documentation requires a supported version of Sphinx (-DBUILD_DOC=on).

  • A C++ compiler with reasonable C++14 support is needed.

  • Boost dev >= 1.67 (use -DBOOST_ROOT=<path> for non-standard locations).

  • Running tests requires Sage (-DBUILD_TESTING=on).

  • Running tests with code coverage requires GCov, i.e., the commands gcov, lcov, and genhtml (-DBUILD_COVERAGE=on).