Skip to content

Commit

Permalink
Always add faiss library alias if it's missing (#4028)
Browse files Browse the repository at this point in the history
Always add the `FAISS::FAISS` library target alias if it doesn't exist. This can happen if cuGraph is built and installs FAISS before cuML.

rapidsai/cugraph#1694

Authors:
  - Paul Taylor (https://github.com/trxcllnt)

Approvers:
  - Robert Maynard (https://github.com/robertmaynard)

URL: #4028
  • Loading branch information
trxcllnt authored Jul 6, 2021
1 parent dacfef1 commit cf4b4c4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cpp/cmake/thirdparty/get_faiss.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ function(find_and_configure_faiss)

if(FAISS_ADDED)
target_include_directories(faiss INTERFACE $<BUILD_INTERFACE:${FAISS_SOURCE_DIR}>)
add_library(FAISS::FAISS ALIAS faiss)
endif()

if(TARGET faiss AND NOT TARGET FAISS::FAISS)
add_library(FAISS::FAISS ALIAS faiss)
endif()

endfunction()
Expand Down

0 comments on commit cf4b4c4

Please sign in to comment.