Blosc / c-blosc2

A fast, compressed, persistent binary data store library for C.
https://www.blosc.org
Other
435 stars 81 forks source link

RFE: provide PREFER_EXTERNAL_XXHASH configuration option #489

Open keszybz opened 1 year ago

keszybz commented 1 year ago

In compilation for Fedora, I'm able to set -DPREFER_EXTERNAL_LZ4:BOOL=ON, -DPREFER_EXTERNAL_ZLIB:BOOL=ON, -DPREFER_EXTERNAL_ZSTD:BOOL=ON, but I see a bundled copy of xxhash is still being used. It'd be great to use the distro copy too.

keszybz commented 1 year ago

With the following:

rm -v plugins/codecs/ndlz/xxhash.?
sed -r -i '/xxhash.c/d' plugins/codecs/ndlz/CMakeLists.txt

everything builds fine and test_plugin_test_ndlz passes without issue.

So it seems that it'd be just a matter of skipping the xxhash.c from the sources and ensuring that xxhash.h from /usr/include is used.

FrancescAlted commented 1 year ago

Ok, but this will add the xxhash dependency, right? I suppose we would need something like PREFER_EXTERNAL_XXHASH. If you can provide a PR, I'll be happy to discuss more about this.