Skip to content

Commit 60079fd

Browse files
enable WITH_BENCHMARK in the makefile
Signed-off-by: Alexandr Guzhva <alexanderguzhva@gmail.com>
1 parent c884fd8 commit 60079fd

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ CONAN_INSTALL_FLAGS := --update --build=missing
2020
# Usage: make WITH_GPU=True WITH_UT=True WITH_ASAN=True WITH_DEBUG=True
2121
WITH_GPU ?=
2222
WITH_UT ?=
23+
WITH_BENCHMARK ?=
2324
WITH_ASAN ?=
2425
WITH_SVS ?=
2526
WITH_CARDINAL ?=
@@ -31,7 +32,7 @@ CONAN_PROFILE ?=
3132
# variables such as WITH_ASAN to every sub-process, which causes the custom
3233
# folly recipe to pick up $ENV{WITH_ASAN} and compile folly itself with
3334
# -fsanitize=address — breaking the build on GCC.
34-
unexport WITH_GPU WITH_UT WITH_ASAN WITH_CARDINAL WITH_DEBUG
35+
unexport WITH_GPU WITH_UT WITH_BENCHMARK WITH_ASAN WITH_CARDINAL WITH_DEBUG
3536

3637
# ---------- Derived settings ----------
3738
ifdef WITH_DEBUG
@@ -72,6 +73,10 @@ ifdef WITH_UT
7273
CONAN_SETTINGS += -o with_ut=True
7374
endif
7475

76+
ifdef WITH_BENCHMARK
77+
CONAN_SETTINGS += -o with_benchmark=True
78+
endif
79+
7580
ifdef WITH_ASAN
7681
CONAN_SETTINGS += -o with_asan=True
7782
endif
@@ -97,7 +102,7 @@ all: build ## Default: CPU release build
97102

98103
# ---------- Build ----------
99104

100-
build: ## Build knowhere (use WITH_GPU=True, WITH_UT=True, WITH_ASAN=True)
105+
build: ## Build knowhere (use WITH_GPU=True, WITH_UT=True, WITH_BENCHMARK=True, WITH_ASAN=True)
101106
ifdef WITH_GPU
102107
@$(PWD)/scripts/prepare_gpu_build.sh
103108
endif
@@ -148,6 +153,7 @@ help: ## Show available targets
148153
@echo "Build flags:"
149154
@echo " WITH_GPU=True Enable GPU (cuVS) build"
150155
@echo " WITH_UT=True Enable unit tests"
156+
@echo " WITH_BENCHMARK=True Enable benchmarks build"
151157
@echo " WITH_ASAN=True Enable AddressSanitizer"
152158
@echo " WITH_SVS=True Enable SVS (Intel Scalable Vector Search, x86 only)"
153159
@echo " WITH_CARDINAL=True Enable Cardinal build"

0 commit comments

Comments
 (0)