Skip to content

Commit 48c8357

Browse files
committed
Conditionally compile extras like benchmarks and demos
1 parent bfdda6a commit 48c8357

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

CMakeLists.txt

+6-4
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ option(FAISS_ENABLE_CUVS "Enable cuVS for GPU indexes." OFF)
6464
option(FAISS_ENABLE_ROCM "Enable ROCm for GPU indexes." OFF)
6565
option(FAISS_ENABLE_PYTHON "Build Python extension." ON)
6666
option(FAISS_ENABLE_C_API "Build C API." OFF)
67+
option(FAISS_ENABLE_EXTRAS "Build extras like benchmarks and demos" ON)
6768
option(FAISS_USE_LTO "Enable Link-Time optimization" OFF)
6869

6970
if(FAISS_ENABLE_GPU)
@@ -103,10 +104,11 @@ if(FAISS_ENABLE_C_API)
103104
add_subdirectory(c_api)
104105
endif()
105106

106-
add_subdirectory(demos)
107-
add_subdirectory(benchs)
108-
add_subdirectory(tutorial/cpp)
109-
107+
if(FAISS_ENABLE_EXTRAS)
108+
add_subdirectory(demos)
109+
add_subdirectory(benchs)
110+
add_subdirectory(tutorial/cpp)
111+
endif()
110112

111113
# CTest must be included in the top level to enable `make test` target.
112114
include(CTest)

0 commit comments

Comments
 (0)