@@ -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
2121WITH_GPU ?=
2222WITH_UT ?=
23+ WITH_BENCHMARK ?=
2324WITH_ASAN ?=
2425WITH_SVS ?=
2526WITH_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 ----------
3738ifdef WITH_DEBUG
@@ -72,6 +73,10 @@ ifdef WITH_UT
7273 CONAN_SETTINGS += -o with_ut=True
7374endif
7475
76+ ifdef WITH_BENCHMARK
77+ CONAN_SETTINGS += -o with_benchmark=True
78+ endif
79+
7580ifdef WITH_ASAN
7681 CONAN_SETTINGS += -o with_asan=True
7782endif
@@ -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)
101106ifdef WITH_GPU
102107 @$(PWD)/scripts/prepare_gpu_build.sh
103108endif
@@ -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