Building - llersch/pibench GitHub Wiki

The project comprises an executable binary that dynamically links to a shared library implementing a persistent data structure.

Dependencies

The project requires C++17 and was tested with gcc 8.1.0 and CMake 3.13.1.

CMake

CMake supports out-of-source builds, which means that binaries are generated in a different directory than the source files. This not only maintains a clean source directory, but also allows multiple coexisting builds with different configurations.

The typical approach is to create a build folder inside the project root folder after cloning it with git:

$ git clone --recursive https://github.com/wangtzh/pibench.git
$ cd pibench
$ mkdir build

The --recursive option indicates that submodules should also be cloned. To generate the build files, type:

$ cd build
$ cmake ..

A specific compiler can be specified with:

$ CC=<path_to_bin> CXX=<path_to_bin> cmake ..

Alternatively, a debug version without optimizations is also supported:

$ cmake -DCMAKE_BUILD_TYPE=Debug ..

Finally, to compile:

$ make