diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 05:39:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 05:39:03 +0000 |
commit | 408c608fc7bf1557ee987dd7fbe662fabed21a53 (patch) | |
tree | 8b07135336de378134bfedc808d49747174810d3 /benchmarks/Makefile | |
parent | Initial commit. (diff) | |
download | frozen-408c608fc7bf1557ee987dd7fbe662fabed21a53.tar.xz frozen-408c608fc7bf1557ee987dd7fbe662fabed21a53.zip |
Adding upstream version 1.1.1.upstream/1.1.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | benchmarks/Makefile | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/benchmarks/Makefile b/benchmarks/Makefile new file mode 100644 index 0000000..251f2bc --- /dev/null +++ b/benchmarks/Makefile @@ -0,0 +1,27 @@ +ifndef GOOGLE_BENCHMARK_PREFIX + $(error GOOGLE_BENCHMARK_PREFIX is undefined) +endif + +CXXFLAGS=-O2 +override CXXFLAGS+= -std=c++17 #17 for boyer_moore_searcher + +LIBS=-lbenchmark -lpthread +LDFLAGS=-L$(GOOGLE_BENCHMARK_PREFIX)/lib + +CPPFLAGS=-I../include -I$(GOOGLE_BENCHMARK_PREFIX)/include + + +all:bench + ./$< + +bench: bench_main.o bench_str_set.o bench_str_unordered_set.o bench_int_set.o bench_int_unordered_set.o bench_str_search.o + $(CXX) $^ $(LDFLAGS) $(LIBS) -o $@ + +clean: + $(RM) *.o bench bench_str_unordered_set.cpp bench_int_unordered_set.cpp + +bench_str_unordered_set.cpp:bench_str_set.cpp + sed -e 's/set/unordered_set/g' -e 's/Set/UnorderedSet/g' $< > $@ + +bench_int_unordered_set.cpp:bench_int_set.cpp + sed -e 's/set/unordered_set/g' -e 's/Set/UnorderedSet/g' $< > $@ |