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

WIP: [DO NOT MERGE] Associate headers with raft target via a CMake FILE_SET #2528

Draft
wants to merge 25 commits into
base: branch-25.02
Choose a base branch
from
Draft
Changes from 1 commit
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
Prev Previous commit
Next Next commit
try using filesets
  • Loading branch information
jameslamb committed Dec 11, 2024
commit 991863ab3fde798a86085e70cca84bf87eb9a920
20 changes: 18 additions & 2 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,16 @@ target_include_directories(
raft INTERFACE "$<BUILD_INTERFACE:${RAFT_SOURCE_DIR}/include>" "$<INSTALL_INTERFACE:include>"
)

# associate headers with the target, so other projects can install just the
# headers via 'install(TARGETS raft)`
target_sources(
raft
INTERFACE
FILE_SET raft-headers
TYPE HEADERS
BASE_DIRS include/raft
)

# Keep RAFT as lightweight as possible. Only CUDA libs and rmm should be used in global target.
target_link_libraries(
raft INTERFACE rmm::rmm rmm::rmm_logger spdlog::spdlog_header_only cuco::cuco
Expand Down Expand Up @@ -386,7 +396,7 @@ rapids_cmake_install_lib_dir(lib_dir)
include(GNUInstallDirs)
include(CPack)

message(FATAL_ERROR "--- using jameslamb/raft ---")
message(STATUS "--- using jameslamb/raft ---")
install(
TARGETS raft
DESTINATION ${lib_dir}
Expand Down Expand Up @@ -428,8 +438,14 @@ install(
EXPORT raft-distributed-exports
)

# install(
# DIRECTORY include/raft
# COMPONENT raft
# DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
# )

install(
DIRECTORY include/raft
TARGETS raft
COMPONENT raft
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)
Expand Down