Skip to content

Commit 864012f

Browse files
removed redundant definition check; modified the message to be more informative
1 parent 64be844 commit 864012f

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

cpp/bench/ann/CMakeLists.txt

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,20 +58,18 @@ set(CUVS_ANN_BENCH_USE_FAISS OFF)
5858
message(STATUS "Checking for FAISS use in benchmarks...")
5959
foreach(_varName ${_variableNames})
6060
if(_varName MATCHES "CUVS_ANN_BENCH_USE_FAISS.+")
61-
if(DEFINED ${_varName})
62-
if(${_varName})
63-
set(CUVS_ANN_BENCH_USE_FAISS ON)
64-
message(STATUS "FAISS use in benchmarks detected.")
65-
break()
66-
endif()
67-
endif()
61+
if(${_varName})
62+
set(CUVS_ANN_BENCH_USE_FAISS ON)
63+
message(STATUS "${_varName} is detected as ON.")
64+
break()
65+
endif()
6866
endif()
6967
endforeach()
7068

7169
if(CUVS_ANN_BENCH_USE_FAISS)
72-
message(STATUS "CUVS_ANN_BENCH_USE_FAISS is ON")
70+
message(STATUS "CUVS_ANN_BENCH_USE_FAISS is switched ON")
7371
else()
74-
message(STATUS "CUVS_ANN_BENCH_USE_FAISS is OFF")
72+
message(STATUS "CUVS_ANN_BENCH_USE_FAISS is switched OFF")
7573
endif()
7674

7775
# ----------------------------------

0 commit comments

Comments
 (0)