Compiling from Source

leap-accelerate compilation is compatible with g++ and clang++ on debian or ubuntu. Support for compiling on other operating systems is currently experimental.



Minimum Versions Compatibility

  • g++ 6.3.0

  • cuda 9.0

  • boost 1.63.0

  • cmake 3.15.1

  • casacore 3.1.2

Ubuntu/Debian Dependencies

20.04 LTS
  • sudo apt-get install gcc g++ gdb doxygen cmake casacore-dev clang-tidy-10 libboost1.71-all-dev libgsl-dev


18.04 LTS
  • sudo apt-get install gcc g++ gdb doxygen cmake casacore-dev clang-tidy-10 libboost1.65-all-dev libgsl-dev


16.04 LTS

  • sudo apt-get install gcc-6 g++-6 gdb doxygen casacore-dev libboost1.58-all-dev libgsl-dev


CMake Options

Use cmake .. -D<OPTION>=<VALUE> ... or ccmake .. to set cmake options.

Setting an environment variable of the same name will also override these cmake options:

CUDA_ENABLED - Enables building with cuda support

CMAKE_CUDA_ARCHITECTURES - Selects the target cuda streaming multiprocessor and compute levels (default is all)

WERROR - Enables warnings as Errors

WCONVERSION - Enables warnings on implicit numeric conversions

TRACE - Traces data to the local directory

CMAKE_RUN_CLANG_TIDY - Enables running clang-tidy with the compiler

USE_PCH - Use pre-compile headers internally, if possible (defaults to ON)

Compile Commands

From the repository root folder run:

git submodule update --init --recursive

NOTE: pulling exernal submodules is now automated by CMake. When downloading the source files via tools other than git the folder external/ will need to be copied manually.


Build Debug


With tracing to file:


With gcovr analysis:

cmake -B build/Debug -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS_DEBUG="-g -O1" -DCMAKE_CXX_FLAGS="-coverage" -DCMAKE_EXE_LINKER_FLAGS="-coverage"

Build Release

cmake -B build/Release -DCMAKE_BUILD_TYPE=Release -DCUDA_ENABLED=TRUE

CUDA Hints

If cmake fails to detect CUDA try adding the following hint variables:

export CUDA_HOME=/usr/local/cuda
export PATH=$PATH:$CUDA_HOME/bin


Testing provided via googletest. To test using the google test runner, test binaries can be executed directly using the following commands from the output folder:

./bin/tests/LeapAccelerate.Tests ./bin/tests/LeapAccelerateCLI.Tests

To test using CTest use the following command in build/linux:

make test or ctest

for verbose output use:

ctest --verbose or ctest --output-on-failure


Generated documentation is available locally at the following file location:


Once deployed to a branch the docs will be available here:

Test Coverage (Debug Only)


make coverage

Building from Source

Doxygen documentation is generated for all C++ and cuda files with the following target:

make doxygen

Sphinx/Breath/Exhale docs is a dependent target generated with the following command:

make sphinx

gitlab repo

The CI/CD on gitlab used a pre-built base build image along with a cpp_build_base image to speed this process.