BPHash
General object hashing library for C++
|
The BPHash project is configured and built using CMake (https://cmake.org).
The only dependencies are a C++ compiler (and standard libraries) capable of compiling C++11 (in particular, variadic templates) and CMake (v3.1.3 or above).
The basic building steps are the traditional CMake steps:
There are a few more helpful options:
BUILD_SHARED_LIBS
can be set to True
to build a shared library, rather than the default static library.
CMAKE_CXX_FLAGS
can be set to compiler-specific optimization flags. For example, to let g++ autodetect the best optimization for the current system, you can use
For the Intel compiler, the equivalent would be
Testing is done with make test
. A quick benchmark can be run with the test_benchmark
program. To do so, run the following command from the top-level build directory:
The only argument is the size of the data set to benchmark with (in bytes).
make install
will install the headers and library. It will also install a CMake configuration file that can be used to include BPHash in other projects. This creates a CMake interface target that can be used with target_link_libraries
. The top-level install path (what was passed to CMAKE_INSTALL_PREFIX
) must be in your CMAKE_PREFIX_PATH
(or be one of the system defaults).
Note that your project must be built with (at least) C++11 support.