-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add patch to separate build of libfaiss_avx2 from libfaiss
- Loading branch information
1 parent
2f7e0b3
commit 05bb9bd
Showing
4 changed files
with
50 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
recipe/patches/0003-enable-building-libfaiss_avx2-without-libfaiss.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
From c6396047a9f44ee4349bea3da1e903b9019d3d1a Mon Sep 17 00:00:00 2001 | ||
From: "H. Vetinari" <h.vetinari@gmx.com> | ||
Date: Wed, 2 Jun 2021 22:58:19 +0200 | ||
Subject: [PATCH 3/3] enable building libfaiss_avx2 without libfaiss | ||
|
||
--- | ||
faiss/CMakeLists.txt | 19 +++++++++++-------- | ||
1 file changed, 11 insertions(+), 8 deletions(-) | ||
|
||
diff --git a/faiss/CMakeLists.txt b/faiss/CMakeLists.txt | ||
index 30d573f0..4231ae9b 100644 | ||
--- a/faiss/CMakeLists.txt | ||
+++ b/faiss/CMakeLists.txt | ||
@@ -225,18 +225,21 @@ else() | ||
target_link_libraries(faiss_avx2 PRIVATE ${LAPACK_LIBRARIES}) | ||
endif() | ||
|
||
-install(TARGETS faiss | ||
- EXPORT faiss-targets | ||
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} | ||
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
- INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} | ||
-) | ||
-if(FAISS_OPT_LEVEL STREQUAL "avx2") | ||
+if(NOT FAISS_OPT_LEVEL STREQUAL "avx2") | ||
+ install(TARGETS faiss | ||
+ EXPORT faiss-targets | ||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} | ||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
+ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} | ||
+ ) | ||
+else() | ||
install(TARGETS faiss_avx2 | ||
EXPORT faiss-targets | ||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} | ||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
+ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} | ||
) | ||
endif() | ||
|
||
-- | ||
2.31.1.windows.1 | ||
|