mirror of
https://github.com/pineappleEA/pineapple-src.git
synced 2024-12-12 05:18:25 -05:00
40 lines
1.5 KiB
Diff
40 lines
1.5 KiB
Diff
|
diff --git a/cmake/faiss-config.cmake.in b/cmake/faiss-config.cmake.in
|
||
|
index 43ea9d4..437a7f8 100644
|
||
|
--- 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
|
||
|
index 30d573f..9af8baf 100644
|
||
|
--- a/faiss/CMakeLists.txt
|
||
|
+++ b/faiss/CMakeLists.txt
|
||
|
@@ -212,17 +212,17 @@ target_link_libraries(faiss PRIVATE OpenMP::OpenMP_CXX)
|
||
|
target_link_libraries(faiss_avx2 PRIVATE OpenMP::OpenMP_CXX)
|
||
|
|
||
|
find_package(MKL)
|
||
|
-if(MKL_FOUND)
|
||
|
+if(0)
|
||
|
target_link_libraries(faiss PRIVATE ${MKL_LIBRARIES})
|
||
|
target_link_libraries(faiss_avx2 PRIVATE ${MKL_LIBRARIES})
|
||
|
else()
|
||
|
find_package(BLAS REQUIRED)
|
||
|
- target_link_libraries(faiss PRIVATE ${BLAS_LIBRARIES})
|
||
|
- target_link_libraries(faiss_avx2 PRIVATE ${BLAS_LIBRARIES})
|
||
|
+ target_link_libraries(faiss PRIVATE BLAS::BLAS)
|
||
|
+ target_link_libraries(faiss_avx2 PRIVATE BLAS::BLAS)
|
||
|
|
||
|
find_package(LAPACK REQUIRED)
|
||
|
- target_link_libraries(faiss PRIVATE ${LAPACK_LIBRARIES})
|
||
|
- target_link_libraries(faiss_avx2 PRIVATE ${LAPACK_LIBRARIES})
|
||
|
+ target_link_libraries(faiss PRIVATE LAPACK::LAPACK)
|
||
|
+ target_link_libraries(faiss_avx2 PRIVATE LAPACK::LAPACK)
|
||
|
endif()
|
||
|
|
||
|
install(TARGETS faiss
|