From d02d57843dcfd6b6028620ea7bdfaa54df21ffb4 Mon Sep 17 00:00:00 2001 From: Artem Labazov Date: Mon, 16 Dec 2024 21:52:13 +0300 Subject: [PATCH] Conditionally compile extras like benchmarks and demos --- CMakeLists.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6bd1ad3eaf..50843cb716 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,6 +64,7 @@ option(FAISS_ENABLE_CUVS "Enable cuVS for GPU indexes." OFF) option(FAISS_ENABLE_ROCM "Enable ROCm for GPU indexes." OFF) option(FAISS_ENABLE_PYTHON "Build Python extension." ON) option(FAISS_ENABLE_C_API "Build C API." OFF) +option(FAISS_ENABLE_EXTRAS "Build extras like benchmarks and demos" ON) option(FAISS_USE_LTO "Enable Link-Time optimization" OFF) if(FAISS_ENABLE_GPU) @@ -103,10 +104,11 @@ if(FAISS_ENABLE_C_API) add_subdirectory(c_api) endif() -add_subdirectory(demos) -add_subdirectory(benchs) -add_subdirectory(tutorial/cpp) - +if(FAISS_ENABLE_EXTRAS) + add_subdirectory(demos) + add_subdirectory(benchs) + add_subdirectory(tutorial/cpp) +endif() # CTest must be included in the top level to enable `make test` target. include(CTest)