Skip to content

Commit

Permalink
Merge pull request #10 from oschonrock/tidydependencies
Browse files Browse the repository at this point in the history
Tidy dependencies
  • Loading branch information
lemire authored Dec 9, 2024
2 parents 9bca63c + a9630fa commit ded046b
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 2,034 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "dependencies/fastfilter_cpp"]
path = dependencies/fastfilter_cpp
url = https://github.com/FastFilter/fastfilter_cpp.git
[submodule "dependencies/xor_singleheader"]
path = dependencies/xor_singleheader
url = https://github.com/FastFilter/xor_singleheader.git
31 changes: 27 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,38 @@ all: build_filter query_filter
dependencies/fastfilter_cpp/src/xorfilter/xorfilter.h:
git submodule update --init --recursive

dependencies/xor_singleheader/include/binaryfusefilter.h:
git submodule update --init --recursive

query_filter: src/query_filter.cpp src/hexutil.h dependencies/xor_singleheader/include/xorfilter.h
c++ -O3 -o query_filter src/query_filter.cpp -Wall -std=c++11 -Idependencies/fastfilter_cpp/src -Idependencies
query_filter: src/query_filter.cpp \
src/hexutil.h \
src/mappeablebloomfilter.h \
src/util.h \
src/sha.h \
dependencies/xor_singleheader/include/binaryfusefilter.h \
dependencies/xor_singleheader/include/xorfilter.h
c++ -O3 -o query_filter src/query_filter.cpp -Wall -std=c++11 -Idependencies

build_filter: src/build_filter.cpp dependencies/fastfilter_cpp/src/xorfilter/xorfilter.h dependencies/fastfilter_cpp/src/xorfilter/xorfilter_plus.h src/hexutil.h dependencies/xor_singleheader/include/xorfilter.h
build_filter: src/build_filter.cpp \
src/hexutil.h \
src/mappeablebloomfilter.h \
src/util.h \
dependencies/fastfilter_cpp/src/bloom/bloom.h \
dependencies/fastfilter_cpp/src/hashutil.h \
dependencies/xor_singleheader/include/binaryfusefilter.h \
dependencies/xor_singleheader/include/xorfilter.h
c++ -O3 -o build_filter src/build_filter.cpp -std=c++11 -Wall -Idependencies/fastfilter_cpp/src -Idependencies

test: build_filter query_filter
./build_filter -V -f xor8 -o filter.bin sample.txt && ./query_filter filter.bin 7C4A8D09CA3762AF | grep "Probably in the set" && ./build_filter -V -f binaryfuse8 -o filter.bin sample.txt && ./query_filter filter.bin 7C4A8D09CA3762AF | grep "Probably in the set" && ./build_filter -V -f binaryfuse16 -o filter.bin sample.txt && ./query_filter filter.bin 7C4A8D09CA3762AF | grep "Probably in the set" && ./build_filter -V -f bloom12 -o filter.bin sample.txt && ./query_filter filter.bin 7C4A8D09CA3762AF | grep "Probably in the set" && echo "SUCCESS" || (echo "Failure. There is a bug."| exit -1)
./build_filter -V -f xor8 -o filter.bin sample.txt && \
./query_filter filter.bin 7C4A8D09CA3762AF | grep "Probably in the set" && \
./build_filter -V -f binaryfuse8 -o filter.bin sample.txt && \
./query_filter filter.bin 7C4A8D09CA3762AF | grep "Probably in the set" && \
./build_filter -V -f binaryfuse16 -o filter.bin sample.txt && \
./query_filter filter.bin 7C4A8D09CA3762AF | grep "Probably in the set" && \
./build_filter -V -f bloom12 -o filter.bin sample.txt && \
./query_filter filter.bin 7C4A8D09CA3762AF | grep "Probably in the set" && \
echo "SUCCESS" || (echo "Failure. There is a bug."| exit -1)

clean:
rm -f build_filter query_filter
1 change: 1 addition & 0 deletions dependencies/xor_singleheader
Submodule xor_singleheader added at 3c0fd1
Loading

0 comments on commit ded046b

Please sign in to comment.