Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 5 additions & 14 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -419,11 +419,8 @@ include(cmake/thirdparty/get_xxhash.cmake)
# find zstd
include(cmake/thirdparty/get_zstd.cmake)

# Build librtcx as a subdirectory (zstd and nvtx3 are already available at this point)
add_subdirectory(librtcx)

# JIT Embedding helper functions
include(librtcx/embed.cmake)
# Fetch librtcx via CPM (zstd and nvtx3 are already available at this point)
include(cmake/thirdparty/get_rtcx.cmake)

# Pre-compiled fragment management helper functions
include(cmake/Modules/AddFragment.cmake)
Expand All @@ -432,7 +429,7 @@ include(cmake/Modules/AddFragment.cmake)
if(NOT BUILD_SHARED_LIBS)
include("${rapids-cmake-dir}/export/find_package_file.cmake")
list(APPEND METADATA_KINDS BUILD INSTALL)
list(APPEND dependencies KvikIO ZLIB nvcomp nanoarrow zstd)
list(APPEND dependencies KvikIO ZLIB nvcomp nanoarrow zstd rtcx)

foreach(METADATA_KIND IN LISTS METADATA_KINDS)
foreach(dep IN LISTS dependencies)
Expand All @@ -443,18 +440,13 @@ if(NOT BUILD_SHARED_LIBS)
if(TARGET conda_env)
install(TARGETS conda_env EXPORT cudf-exports)
endif()
install(
TARGETS rtcx
EXPORT cudf-exports
DESTINATION ${lib_dir}
)
endif()

rtcx_add_embed(cudf_cuda_embed)

rtcx_embed_includes(
cudf_cuda_embed SOURCE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/librtcx/libcxx DEST_DIRECTORY
librtcx/libcxx INCLUDE_DIRECTORIES librtcx/libcxx
cudf_cuda_embed SOURCE_DIRECTORY ${rtcx_SOURCE_DIR}/libcxx DEST_DIRECTORY librtcx/libcxx
INCLUDE_DIRECTORIES librtcx/libcxx
)

rtcx_embed_includes(
Expand Down Expand Up @@ -1215,7 +1207,6 @@ target_include_directories(
"$<BUILD_INTERFACE:${nanoarrow_SOURCE_DIR}/src>"
"$<BUILD_INTERFACE:${FlatBuffers_SOURCE_DIR}/include>"
"$<BUILD_INTERFACE:${ZSTD_INCLUDE_DIR}>"
"$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/librtcx>"
"$<BUILD_INTERFACE:${cudf_cuda_embed_INCLUDE_DIRS}>"
"$<BUILD_INTERFACE:${cudf_fragments_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:include>"
Expand Down
32 changes: 32 additions & 0 deletions cpp/cmake/thirdparty/get_rtcx.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# cmake-format: off
# SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
# cmake-format: on

# This function finds rtcx
function(find_and_configure_rtcx VERSION)

# Ensure rtcx installs its targets unconditionally. In shared builds the static library is
# absorbed into libcudf.so, but CMake still requires the target to be in an export set for
# install(EXPORT) validation. In static builds consumers need to link librtcx.a directly.
set(RTCX_INSTALL ON)

rapids_cpm_find(
rtcx ${VERSION}
GLOBAL_TARGETS rtcx::rtcx
CPM_ARGS
GIT_REPOSITORY https://github.com/rapidsai/librtcx.git
GIT_TAG efad266c1fd9de6d8486c6ba71bfa74df063eb1f
GIT_SHALLOW FALSE
EXCLUDE_FROM_ALL ${CUDF_EXCLUDE_DEPS_FROM_ALL}
)

# When CPM fetches from source (add_subdirectory), embed.cmake is not auto-included. Include it
# explicitly so add_embed/embed_includes/embed functions are available.
if(rtcx_ADDED OR DEFINED CPM_rtcx_SOURCE)
include("${rtcx_SOURCE_DIR}/embed.cmake")
endif()
Comment thread
coderabbitai[bot] marked this conversation as resolved.
endfunction()

set(RTCX_MIN_VERSION_cudf "0.1")
find_and_configure_rtcx(${RTCX_MIN_VERSION_cudf})
166 changes: 0 additions & 166 deletions cpp/librtcx/CMakeLists.txt

This file was deleted.

58 changes: 0 additions & 58 deletions cpp/librtcx/CONTRIBUTING.md

This file was deleted.

Loading
Loading