Skip to content

Commit f09341a

Browse files
authored
Always add faiss library alias if it's missing (rapidsai#4028)
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: rapidsai#4028
1 parent b0f8b2c commit f09341a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cpp/cmake/thirdparty/get_faiss.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ function(find_and_configure_faiss)
4040

4141
if(FAISS_ADDED)
4242
target_include_directories(faiss INTERFACE $<BUILD_INTERFACE:${FAISS_SOURCE_DIR}>)
43-
add_library(FAISS::FAISS ALIAS faiss)
43+
endif()
44+
45+
if(TARGET faiss AND NOT TARGET FAISS::FAISS)
46+
add_library(FAISS::FAISS ALIAS faiss)
4447
endif()
4548

4649
endfunction()

0 commit comments

Comments
 (0)