Skip to content

ldorau/librpma

Repository files navigation

librpma

Travis build status GHA build status librpma version Coverity Scan Build Status Coverage Status

More information in src/README.md

How to build

Requirements:

  • cmake >= 3.3
  • compiler with C++11 support:
    • GCC >= 4.8.1 (C++11 is supported in GCC since version 4.8.1, but it does not support expanding variadic template variables in lambda expressions, which is required to build persistent containers and is possible with GCC >= 4.9.0. If you want to build librpma without testing containers, use flag TEST_XXX=OFF (separate flag for each container))
    • clang >= 3.3
  • for testing and development:

On Linux

$ mkdir build
$ cd build
$ cmake ..
$ make
$ make install

When developing:

$ ...
$ cmake .. -DCMAKE_BUILD_TYPE=Debug -DDEVELOPER_MODE=1 -DCHECK_CPP_STYLE=1
$ ...
$ ctest --output-on-failure

To build packages

...
cmake .. -DCPACK_GENERATOR="$GEN" -DCMAKE_INSTALL_PREFIX=/usr
make package

$GEN is type of package generator and can be RPM or DEB

CMAKE_INSTALL_PREFIX must be set to a destination were packages will be installed

To use with Valgrind

In order to build your application with librpma and pmemcheck / memcheck / helgrind / drd, Valgrind instrumentation must be enabled during compilation by adding flags:

  • LIBRPMA_VG_PMEMCHECK_ENABLED=1 for pmemcheck instrumentation,
  • LIBRPMA_VG_MEMCHECK_ENABLED=1 for memcheck instrumentation,
  • LIBRPMA_VG_HELGRIND_ENABLED=1 for helgrind instrumentation,
  • LIBRPMA_VG_DRD_ENABLED=1 for drd instrumentation, or
  • LIBRPMA_VG_ENABLED=1 for all Valgrind instrumentations (including pmemcheck).

If there are no memcheck / helgrind / drd / pmemcheck headers installed on your system, build will fail.