- CMake
>= 3.16
- C++ Compiler
>= C++17
- and see Dockerfile section
# retrieve third party modules
git submodule update --init --recursive
FROM ubuntu:22.04
RUN apt update -y && apt install -y git build-essential cmake ninja-build libboost-filesystem-dev doxygen libnuma-dev
This 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=OFF
- never build test programs-DBUILD_MEMORY=OFF
- never build API in-memory implementation-DBUILD_SHIRAKAMI=OFF
- never build shirakami bridge-DBUILD_EXAMPLES=OFF
- never build example programs-DBUILD_DOCUMENTS=OFF
- never build documents by doxygen-DINSTALL_EXAMPLES=ON
- also install example programs (requiresBUILD_EXAMPLES
is enables)-DEXAMPLE_IMPLEMENTATION=...
- link the specified target-name implementation to example programsmemory
- link to in-memory implementation (default)shirakami
- link to shirakami implementation
-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 install
ctest -V
cmake --build . --target doxygen
Sharksfin 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 A
GLOG_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