jbapple / libfilter

High-speed Bloom filters and taffy filters for C, C++, and Java
Apache License 2.0
32 stars 6 forks source link

Add CMake as an alternative build scaffold #2

Closed tobim closed 2 years ago

tobim commented 2 years ago

The project can now be built with

cmake -Bbuild -S . -DCMAKE_PREFIX_PATH=<your/install/location>
cmake --build build
cmake --install install # <- use sudo if the current user doesn't have write permissions for <your/install/location>

One can also import the CMake targets into other projects with find_package(libfilter). One should then be able to link with the libfilter::c and libfilter::cxx targets.

The scaffolding is done so one can use find_package(libfilter) or add_subdirectory(libfilter) interchangeably.

mavam commented 2 years ago

Thanks @tobim! 🙏

jbapple commented 2 years ago

Thank you for the contribution! I'll take a few days to get my head around it.

tobim commented 2 years ago

@jbapple I got around to incorporate the requested changes.

jbapple commented 2 years ago

Thanks, looks great!

One more thing:

Could you please also alter the README in the root directory to explain how to use the CMake scaffold?

jbapple commented 2 years ago

Thank you for your contribution!