Skip to content

Commit 14fd16a

Browse files
authored
Suppress (thousands of) warnings when building with GCC (#6)
1 parent 44febf0 commit 14fd16a

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

faiss/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,17 @@ endif()
222222
set(FAISS_HEADERS ${FAISS_HEADERS} PARENT_SCOPE)
223223

224224
add_library(faiss ${FAISS_SRC})
225+
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
226+
target_compile_options(
227+
faiss PRIVATE
228+
"-Wno-sign-compare"
229+
"-Wno-unused-function"
230+
"-Wno-unused-variable"
231+
"-Wno-redundant-decls"
232+
"-Wno-maybe-uninitialized"
233+
"-Wno-format"
234+
)
235+
endif()
225236

226237
add_library(faiss_avx2 ${FAISS_SRC})
227238
if(NOT FAISS_OPT_LEVEL STREQUAL "avx2")

0 commit comments

Comments
 (0)