Skip to content
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

correct compliation of cuml c library #3908

8 changes: 8 additions & 0 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ if(BUILD_CUML_C_LIBRARY)
target_link_libraries(${CUML_C_TARGET}
PUBLIC
${CUML_CPP_TARGET}
PRIVATE
FAISS::FAISS
)

Expand Down Expand Up @@ -448,6 +449,13 @@ rapids_export(BUILD cuml
FINAL_CODE_BLOCK code_string
)

##############################################################################
# - build benchmark executable -----------------------------------------------

if(BUILD_CUML_BENCH)
robertmaynard marked this conversation as resolved.
Show resolved Hide resolved
add_subdirectory(bench)
endif(BUILD_CUML_BENCH)

##############################################################################
# - doxygen targets ----------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion cpp/cmake/thirdparty/get_faiss.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function(find_and_configure_faiss)
)

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

Expand Down
7 changes: 4 additions & 3 deletions cpp/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@ endif()
# - build C-API test library -------------------------------------------------

if(BUILD_CUML_C_LIBRARY)

enable_language(C)

add_library(${CUML_C_TEST_TARGET} SHARED
c_api/dbscan_api_test.c
c_api/glm_api_test.c
Expand All @@ -236,8 +239,6 @@ if(BUILD_CUML_C_LIBRARY)
c_api/svm_api_test.c
)

set_target_properties(${CUML_C_TEST_TARGET} PROPERTIES LINKER_LANGUAGE C)

target_link_libraries(${CUML_C_TEST_TARGET} PUBLIC cuml_c)
target_link_libraries(${CUML_C_TEST_TARGET} PUBLIC ${CUML_C_TARGET})

endif(BUILD_CUML_C_LIBRARY)