- CMake
>= 3.16 - C++ Compiler
>= C++17 - and see Dockerfile section
# retrieve third party modules
git submodule update --init --recursiveFROM ubuntu:22.04
RUN apt update -y && apt install -y git build-essential cmake ninja-build libboost-filesystem-dev doxygen libnuma-devThis requires below tsurugidb modules to be installed.
- shirakami if you want to run this API with it.
mkdir build
cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ..
cmake --build .available options:
-DBUILD_TESTS=ON- build test programs-DBUILD_MEMORY=ON- build API in-memory implementation-DBUILD_SHIRAKAMI=OFF- never build shirakami bridge-DBUILD_EXAMPLES=ON- build example programs-DBUILD_DOCUMENTS=ON- build documents by doxygen-DBUILD_STRICT=OFF- don't treat compile warnings as build errors-DINSTALL_EXAMPLES=ON- also install example programs (requiresBUILD_EXAMPLESis enables)-DEXAMPLE_IMPLEMENTATION=...- link the specified target-name implementation to example programsmemory- link to in-memory implementationshirakami- link to shirakami implementation (default)
-DCMAKE_PREFIX_PATH=<installation directory>- indicate dependant installation directory- for debugging only
-DENABLE_SANITIZER=OFF- disable sanitizers (requires-DCMAKE_BUILD_TYPE=Debug)-DENABLE_UB_SANITIZER=ON- enable undefined behavior sanitizer (requires-DENABLE_SANITIZER=ON)-DENABLE_COVERAGE=ON- enable code coverage analysis (requires-DCMAKE_BUILD_TYPE=Debug)-DBUILD_SHARED_LIBS=OFF- create static libraries instead of shared libraries
cmake --build . --target installctest -Vcmake --build . --target doxygenSharksfin internally uses glog so you can pass glog environment variables such as GLOG_logtostderr=1 to customize the logging output of executable that uses sharksfin.
GLOG_logtostderr=1 ./sharksfin-cli -Dlocation=./db1 put 0 AGLOG_minloglevel can be used to set the log level (0=INFO, 1=WARN, 2=ERROR, 3=FATAL). Default log level is WARN.
GLOG_minloglevel=0 ./sharksfin-cli -Dlocation=./db1 put 0 A