2021-07-17 03:03:54 +08:00
|
|
|
diff --git a/cmake/faiss-config.cmake.in b/cmake/faiss-config.cmake.in
|
2021-09-01 08:04:51 +08:00
|
|
|
index 43ea9d4..437a7f8 100644
|
2021-07-17 03:03:54 +08:00
|
|
|
--- a/cmake/faiss-config.cmake.in
|
|
|
|
+++ b/cmake/faiss-config.cmake.in
|
|
|
|
@@ -4,4 +4,7 @@
|
|
|
|
# This source code is licensed under the BSD-style license found in the
|
|
|
|
# LICENSE file in the root directory of this source tree.
|
|
|
|
|
|
|
|
+find_dependency(OpenMP REQUIRED)
|
|
|
|
+find_dependency(BLAS REQUIRED)
|
|
|
|
+find_dependency(LAPACK REQUIRED)
|
|
|
|
include("${CMAKE_CURRENT_LIST_DIR}/faiss-targets.cmake")
|
|
|
|
diff --git a/faiss/CMakeLists.txt b/faiss/CMakeLists.txt
|
2024-10-29 17:27:05 +08:00
|
|
|
index a890a46..5a67a92 100644
|
2021-07-17 03:03:54 +08:00
|
|
|
--- a/faiss/CMakeLists.txt
|
|
|
|
+++ b/faiss/CMakeLists.txt
|
2024-10-29 17:27:05 +08:00
|
|
|
@@ -300,20 +300,20 @@ target_link_libraries(faiss_avx2 PRIVATE OpenMP::OpenMP_CXX)
|
|
|
|
target_link_libraries(faiss_avx512 PRIVATE OpenMP::OpenMP_CXX)
|
2021-07-17 03:03:54 +08:00
|
|
|
|
|
|
|
find_package(MKL)
|
|
|
|
-if(MKL_FOUND)
|
|
|
|
+if(0)
|
|
|
|
target_link_libraries(faiss PRIVATE ${MKL_LIBRARIES})
|
2021-09-01 08:04:51 +08:00
|
|
|
target_link_libraries(faiss_avx2 PRIVATE ${MKL_LIBRARIES})
|
2024-10-29 17:27:05 +08:00
|
|
|
target_link_libraries(faiss_avx512 PRIVATE ${MKL_LIBRARIES})
|
2021-07-17 03:03:54 +08:00
|
|
|
else()
|
|
|
|
find_package(BLAS REQUIRED)
|
|
|
|
- target_link_libraries(faiss PRIVATE ${BLAS_LIBRARIES})
|
2021-09-01 08:04:51 +08:00
|
|
|
- target_link_libraries(faiss_avx2 PRIVATE ${BLAS_LIBRARIES})
|
2024-10-29 17:27:05 +08:00
|
|
|
- target_link_libraries(faiss_avx512 PRIVATE ${BLAS_LIBRARIES})
|
2021-07-17 03:03:54 +08:00
|
|
|
+ target_link_libraries(faiss PRIVATE BLAS::BLAS)
|
2021-09-01 08:04:51 +08:00
|
|
|
+ target_link_libraries(faiss_avx2 PRIVATE BLAS::BLAS)
|
2024-10-29 17:27:05 +08:00
|
|
|
+ target_link_libraries(faiss_avx512 PRIVATE BLAS::BLAS)
|
2021-07-17 03:03:54 +08:00
|
|
|
|
|
|
|
find_package(LAPACK REQUIRED)
|
|
|
|
- target_link_libraries(faiss PRIVATE ${LAPACK_LIBRARIES})
|
2021-09-01 08:04:51 +08:00
|
|
|
- target_link_libraries(faiss_avx2 PRIVATE ${LAPACK_LIBRARIES})
|
2024-10-29 17:27:05 +08:00
|
|
|
- target_link_libraries(faiss_avx512 PRIVATE ${LAPACK_LIBRARIES})
|
2021-07-17 03:03:54 +08:00
|
|
|
+ target_link_libraries(faiss PRIVATE LAPACK::LAPACK)
|
2021-09-01 08:04:51 +08:00
|
|
|
+ target_link_libraries(faiss_avx2 PRIVATE LAPACK::LAPACK)
|
2024-10-29 17:27:05 +08:00
|
|
|
+ target_link_libraries(faiss_avx512 PRIVATE LAPACK::LAPACK)
|
2021-07-17 03:03:54 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
install(TARGETS faiss
|