Skip to content

Commit

Permalink
Update build to use newest rapids-cython code.
Browse files Browse the repository at this point in the history
  • Loading branch information
vyasr committed May 4, 2022
1 parent 70a6d7b commit 922130d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion python/pylibraft/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ set(raft_version 22.06.00)
file(DOWNLOAD https://raw.githubusercontent.com/vyasr/rapids-cmake/rapids-cython/RAPIDS.cmake
${CMAKE_BINARY_DIR}/RAPIDS.cmake)
include(${CMAKE_BINARY_DIR}/RAPIDS.cmake)
include(rapids-cython)

project(
raft-python
Expand Down Expand Up @@ -58,4 +57,6 @@ if(NOT RAFT_FOUND)
add_subdirectory(../../cpp raft-cpp)
endif()

include(rapids-cython)
rapids_cython_init()
add_subdirectory(pylibraft/distance)
8 changes: 5 additions & 3 deletions python/pylibraft/pylibraft/distance/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@
# =============================================================================

# Set the list of Cython files to build
set(cython_modules pairwise_distance)
set(cython_modules pairwise_distance.pyx)
set(linked_libraries raft::raft raft::distance)

# Build all of the Cython targets
# TODO: Depending on how project calls interact we can't rely on variables like CMAKE_PROJECT_NAME, otherwise we could use that to get the <PROJECT-NAME>_SOURCE_DIR and it wouldn't have to be a parameter. Can we find an alternate approach here?
create_cython_modules("${cython_modules}" "${linked_libraries}" ${raft-python_SOURCE_DIR})
rapids_cython_create_modules(
SOURCE_FILES "${cython_modules}"
LINKED_LIBRARIES "${linked_libraries}"
CXX)

0 comments on commit 922130d

Please sign in to comment.