Skip to content

Commit

Permalink
Moving find_package for libc earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
ramilbakhshyiev committed May 19, 2024
1 parent 62b16a6 commit bfd1d82
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions faiss/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ endif()
# Export FAISS_HEADERS variable to parent scope.
set(FAISS_HEADERS ${FAISS_HEADERS} PARENT_SCOPE)

find_package(libc REQUIRED)
list(PREPEND CMAKE_INCLUDE_PATH ${LIBC_INCLUDE_DIRS})

add_library(faiss ${FAISS_SRC})

add_library(faiss_avx2 ${FAISS_SRC})
Expand Down Expand Up @@ -297,9 +300,6 @@ endif()
target_compile_definitions(faiss_avx2 PRIVATE FINTEGER=int)
target_compile_definitions(faiss_avx512 PRIVATE FINTEGER=int)

find_package(libc REQUIRED)
list(PREPEND CMAKE_INCLUDE_PATH ${LIBC_INCLUDE_DIRS})

find_package(OpenMP REQUIRED)
target_link_libraries(faiss PRIVATE OpenMP::OpenMP_CXX)
target_link_libraries(faiss_avx2 PRIVATE OpenMP::OpenMP_CXX)
Expand Down

0 comments on commit bfd1d82

Please sign in to comment.