Code Monkey home page Code Monkey logo

libpmemobj-cpp's Introduction

libpmemobj-cpp

Build Status Build status libpmemobj-cpp version Coverity Scan Build Status Coverage Status

C++ bindings for libpmemobj (https://github.com/pmem/pmdk) More information in include/libpmemobj++/README.md

How to build

Requirements:

  • cmake >= 3.3
  • libpmemobj-dev(el) >= 1.8 (https://pmem.io/pmdk/)
  • 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 libpmemobj-cpp 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 libpmemobj-cpp and pmemcheck / memcheck / helgrind / drd, Valgrind instrumentation must be enabled during compilation by adding flags:

  • LIBPMEMOBJ_CPP_VG_PMEMCHECK_ENABLED=1 for pmemcheck instrumentation,
  • LIBPMEMOBJ_CPP_VG_MEMCHECK_ENABLED=1 for memcheck instrumentation,
  • LIBPMEMOBJ_CPP_VG_HELGRIND_ENABLED=1 for helgrind instrumentation,
  • LIBPMEMOBJ_CPP_VG_DRD_ENABLED=1 for drd instrumentation, or
  • LIBPMEMOBJ_CPP_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.

On Windows

Install libpmemobj via vcpkg

vcpkg install pmdk:x64-windows
vcpkg integrate install
...
cmake . -Bbuild -G "Visual Studio 14 2015 Win64"
        -DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake

msbuild build/ALL_BUILD.vcxproj

libpmemobj-cpp's People

Contributors

igchor avatar marcinslusarz avatar kkajrewicz avatar ldorau avatar lukaszstolarczuk avatar kfilipek avatar mslusarz avatar kilobyte avatar pbalcer avatar vinser52 avatar annamarcink avatar kjlyon avatar freboat avatar lplewa avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.