-
Notifications
You must be signed in to change notification settings - Fork 6
Fix CMake Bugs #57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix CMake Bugs #57
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -39,13 +39,7 @@ set(FAISS_C_SRC | |||
| ) | ||||
|
|
||||
| add_library(faiss_c ${FAISS_C_SRC}) | ||||
| if(FAISS_OPT_LEVEL STREQUAL "generic") | ||||
| target_link_libraries(faiss_c PRIVATE faiss) | ||||
| elseif(FAISS_OPT_LEVEL STREQUAL "avx2") | ||||
| target_link_libraries(faiss_c PRIVATE faiss_avx2) | ||||
| elseif(FAISS_OPT_LEVEL STREQUAL "avx512") | ||||
| target_link_libraries(faiss_c PRIVATE faiss_avx512) | ||||
| endif() | ||||
| target_link_libraries(faiss_c PRIVATE faiss) | ||||
|
|
||||
| add_library(faiss_c_avx2 ${FAISS_C_SRC}) | ||||
| target_link_libraries(faiss_c_avx2 PRIVATE faiss_avx2) | ||||
|
|
@@ -131,13 +125,15 @@ file(GLOB FAISS_C_API_HEADERS | |||
|
|
||||
| faiss_install_headers("${FAISS_C_API_HEADERS}" c_api) | ||||
|
|
||||
| install(TARGETS faiss_c | ||||
| 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 "generic") | ||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure I follow this, don't we need to do call
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line 428 in 95f5e7e
this check for "generic" is there for the "faiss" sub project as well. |
||||
| install(TARGETS faiss_c | ||||
| EXPORT faiss-targets | ||||
| RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} | ||||
| ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||||
| LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||||
| INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} | ||||
| ) | ||||
| endif() | ||||
| if(FAISS_OPT_LEVEL STREQUAL "avx2") | ||||
| install(TARGETS faiss_c_avx2 | ||||
| EXPORT faiss-targets | ||||
|
|
||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And why are we getting rid of this - in our current builds we do produce libfaiss with the avx2 suffix when FAISS_OPT_LEVEL is set to avx2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
basically earlier we had
in the latest upstream
basically there are specialized
_clibraries for each correspondingfaiss library.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
faiss/c_api/CMakeLists.txt
Line 45 in 95f5e7e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, and this is the bit I'm concerned with, it seems we setup faiss_c and faiss_avx2 currently ..
Will we not require to change anything on our build side on account of this?