Skip to content

Commit

Permalink
Let's try again
Browse files Browse the repository at this point in the history
  • Loading branch information
cjnolet committed Jan 25, 2024
1 parent e317444 commit ff3fddf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 13 deletions.
2 changes: 1 addition & 1 deletion cpp/template/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ include(cmake/thirdparty/get_cuvs.cmake)

# -------------- compile tasks ----------------- #
add_executable(CAGRA_EXAMPLE src/cagra_example.cu)
target_link_libraries(CAGRA_EXAMPLE PRIVATE cuvs::cuvs)
target_link_libraries(CAGRA_EXAMPLE PRIVATE cuvs::cuvs $<TARGET_NAME_IF_EXISTS:conda_env>)
12 changes: 1 addition & 11 deletions cpp/template/cmake/thirdparty/get_cuvs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,24 @@ set(CUVS_FORK "rapidsai")
set(CUVS_PINNED_TAG "branch-${RAPIDS_VERSION}")

function(find_and_configure_cuvs)
set(oneValueArgs VERSION FORK PINNED_TAG COMPILE_LIBRARY ENABLE_NVTX)
set(oneValueArgs VERSION FORK PINNED_TAG ENABLE_NVTX)
cmake_parse_arguments(PKG "${options}" "${oneValueArgs}"
"${multiValueArgs}" ${ARGN} )

set(CUVS_COMPONENTS "")
if(PKG_COMPILE_LIBRARY)
string(APPEND CUVS_COMPONENTS " compiled")
endif()

#-----------------------------------------------------
# Invoke CPM find_package()
#-----------------------------------------------------
rapids_cpm_find(cuvs ${PKG_VERSION}
GLOBAL_TARGETS cuvs::cuvs
BUILD_EXPORT_SET cuvs-template-exports
INSTALL_EXPORT_SET cuvs-template-exports
COMPONENTS ${CUVS_COMPONENTS}
CPM_ARGS
GIT_REPOSITORY https://github.com/${PKG_FORK}/cuvs.git
GIT_TAG ${PKG_PINNED_TAG}
SOURCE_SUBDIR cpp
OPTIONS
"BUILD_TESTS OFF"
"BUILD_PRIMS_BENCH OFF"
"BUILD_ANN_BENCH OFF"
"CUVS_NVTX ${PKG_ENABLE_NVTX}"
"CUVS_COMPILE_LIBRARY ${PKG_COMPILE_LIBRARY}"
)
endfunction()

Expand All @@ -53,6 +44,5 @@ endfunction()
find_and_configure_cuvs(VERSION ${CUVS_VERSION}.00
FORK ${CUVS_FORK}
PINNED_TAG ${CUVS_PINNED_TAG}
COMPILE_LIBRARY ON
ENABLE_NVTX OFF
)
2 changes: 1 addition & 1 deletion cpp/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function(ConfigureTest)
target_link_libraries(
${TEST_NAME}
PRIVATE cuvs
raft::raft
cuvs::cuvs
GTest::gtest
GTest::gtest_main
Threads::Threads
Expand Down

0 comments on commit ff3fddf

Please sign in to comment.