Skip to content
mkind edited this page Nov 25, 2017 · 3 revisions

splonebox uses a cmake based build environment. to process to build splonebox is explained in this wiki.

Build Prerequisites

General Requirements:

  • A recent version of clang or gcc

Platform-specific requirements are listed below.

Archlinux

~ pacman -S libuv msgpack-c base-devel cmake redis hiredis cmocka

Prepare Build

set CC and CXX environment variable

~ export CC=/usr/bin/clang 
~ export CXX=/usr/bin/clang++ 
~ cd path/to/splonebox-core
path/to/splonebox-core % cmake CMakeLists.txt

Build sb

Build the splonebox core target.

~ make sb

The default build type is set to Debug. You can choose 4 build types:

  1. Debug
  2. Release
  3. RelWithDebInfo (Release with Debug Info)
  4. MinSizeRel (Minimum Size Release)

Example:

~ make CMAKE_BUILD_TYPE=MinSizeRel sb

Build test(s)

Build the test target.

~ make test

Build sb-plugin

Build the sb-plugin helper target.

~ make sb-plugin

Build with Clang Address Sanitizer/Memory Sanitizer/Thread Sanitizer

build target with one of the available clang sanitizer's.

~ make EXTRA_FLAGS="-DCLANG_ADDRESS_SANITIZER=On"
~ make EXTRA_FLAGS="-DCLANG_MEMORY_SANITIZER=On"
~ make EXTRA_FLAGS="-DCLANG_THREAD_SANITIZER=On"

run target

targets are located under out/bin directory

clean

cleanup build files

~ make clean

cleanup everything

~ make distclean

Verbose Output

~ make VERBOSE=1
Clone this wiki locally