CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
76 lines
2.0 KiB
CMake
76 lines
2.0 KiB
CMake
# ########################################################################
|
|
# Copyright 2019-2025 Advanced Micro Devices, Inc.
|
|
# ########################################################################
|
|
|
|
# rocThrust header-only library
|
|
|
|
# Configure a header file to pass the rocThrust version
|
|
configure_file(
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/rocthrust_version.hpp.in"
|
|
"${CMAKE_CURRENT_BINARY_DIR}/include/thrust/rocthrust_version.hpp"
|
|
@ONLY
|
|
)
|
|
|
|
# Only header target, does not include dependencies
|
|
add_library(rocthrust INTERFACE)
|
|
target_include_directories(rocthrust
|
|
INTERFACE
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
|
|
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/>
|
|
)
|
|
|
|
if(${LINK_HIP_DEVICE_LIBS})
|
|
target_link_libraries(rocthrust
|
|
INTERFACE
|
|
roc::rocprim_hip
|
|
)
|
|
endif()
|
|
|
|
# hipstdpar header target
|
|
add_library(hipstdpar INTERFACE)
|
|
target_link_libraries(hipstdpar INTERFACE rocthrust)
|
|
|
|
# Installation
|
|
|
|
# We need to install headers manually as rocm_install_targets
|
|
# does not support header-only libraries (INTERFACE targets)
|
|
rocm_install_targets(
|
|
TARGETS rocthrust hipstdpar
|
|
)
|
|
if(CMAKE_VERSION VERSION_LESS 3.7)
|
|
# Workaround: old versions of CMake do not support set(CPACK_DEBIAN_ARCHIVE_TYPE "gnutar")
|
|
# The default archive type is "paxr" which generates corrupted DEB packages
|
|
# if there are long file names.
|
|
set(EXCLUDE_PATTERNS PATTERN "./system/cuda/detail/cub/*" EXCLUDE)
|
|
endif()
|
|
rocm_install(
|
|
DIRECTORY
|
|
"./"
|
|
"${PROJECT_BINARY_DIR}/thrust/include/thrust/"
|
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/thrust
|
|
FILES_MATCHING
|
|
PATTERN "*.h"
|
|
PATTERN "*.cuh"
|
|
PATTERN "*.hpp"
|
|
PATTERN "*.inl"
|
|
${EXCLUDE_PATTERNS}
|
|
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ
|
|
)
|
|
|
|
include(ROCMExportTargetsHeaderOnly)
|
|
|
|
if(${LINK_HIP_DEVICE_LIBS})
|
|
# Export targets
|
|
rocm_export_targets_header_only(
|
|
TARGETS roc::rocthrust
|
|
DEPENDS PACKAGE rocprim
|
|
NAMESPACE roc::
|
|
)
|
|
else()
|
|
rocm_export_targets_header_only(
|
|
TARGETS roc::rocthrust
|
|
NAMESPACE roc::
|
|
)
|
|
endif()
|