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

Include hipstdpar in rocThrust packages #343

Merged
merged 5 commits into from
Dec 1, 2023
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
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ rocm_package_add_deb_dependencies(DEPENDS "rocprim-dev >= 2.10.1")
rocm_package_add_rpm_dependencies(DEPENDS "rocprim-devel >= 2.10.1")
set(CPACK_DEBIAN_PACKAGE_CONFLICTS "hip-thrust, thrust")
set(CPACK_RPM_PACKAGE_CONFLICTS "hip-thrust, thrust")
set(CPACK_DEBIAN_PACKAGE_PROVIDES "hipstdpar")
set(CPACK_RPM_PACKAGE_PROVIDES "hipstdpar")

set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
set(CPACK_RPM_PACKAGE_LICENSE "ASL 2.0")
Expand Down
11 changes: 7 additions & 4 deletions thrust/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,16 @@ target_link_libraries(rocthrust
roc::rocprim_hip
)

# 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
TARGETS rocthrust hipstdpar
)
if(CMAKE_VERSION VERSION_LESS 3.7)
# Workaround: old versions of CMake do not support set(CPACK_DEBIAN_ARCHIVE_TYPE "gnutar")
Expand All @@ -63,13 +67,13 @@ rocm_install(
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ
)

#Install the wrapper to rocthrust folder.
#Install the wrapper to rocthrust folder.
#So wrapper would be in /opt/rocm-xxx/rocthrust/include/thrust
if (BUILD_FILE_REORG_BACKWARD_COMPATIBILITY AND NOT WIN32)
rocm_install(
DIRECTORY
"${PROJECT_BINARY_DIR}/rocthrust/wrapper/"
DESTINATION rocthrust/
DESTINATION rocthrust/
)
endif()

Expand All @@ -80,4 +84,3 @@ rocm_export_targets_header_only(
DEPENDS PACKAGE rocprim
NAMESPACE roc::
)

Loading