Skip to content

Commit

Permalink
sd321110 enhancements (ROCm#237)
Browse files Browse the repository at this point in the history
  • Loading branch information
arvindcheru authored Jun 13, 2022
1 parent d0eefec commit 3530cdd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ if(BUILD_FILE_REORG_BACKWARD_COMPATIBILITY)
PATTERNS "*.h" "*.inl" "*.cuh" "*.hpp"
HEADER_LOCATION include/thrust
GUARDS SYMLINK WRAPPER
WRAPPER_LOCATIONS rocthrust/include/thrust
WRAPPER_LOCATIONS rocthrust/${CMAKE_INSTALL_INCLUDEDIR}/thrust
OUTPUT_LOCATIONS rocthrust/wrapper/include/thrust
)
endif( )
Expand All @@ -201,7 +201,7 @@ set(CPACK_RPM_PACKAGE_LICENSE "ASL 2.0")
# set(CPACK_PACKAGING_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
# endif()

set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "\${CPACK_PACKAGING_INSTALL_PREFIX}" "\${CPACK_PACKAGING_INSTALL_PREFIX}/include")
set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "\${CPACK_PACKAGING_INSTALL_PREFIX}" "\${CPACK_PACKAGING_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}")

rocm_create_package(
NAME rocthrust
Expand Down
9 changes: 3 additions & 6 deletions thrust/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if(BUILD_FILE_REORG_BACKWARD_COMPATIBILITY)
rocm_wrap_header_file(
"rocthrust_version.hpp"
HEADER_LOCATION include/thrust
WRAPPER_LOCATIONS rocthrust/include/thrust
WRAPPER_LOCATIONS rocthrust/${CMAKE_INSTALL_INCLUDEDIR}/thrust
OUTPUT_LOCATIONS rocthrust/wrapper/include/thrust
)
endif()
Expand All @@ -27,7 +27,7 @@ target_include_directories(rocthrust
INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
$<INSTALL_INTERFACE:include/>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/>
)

target_link_libraries(rocthrust
Expand All @@ -37,9 +37,6 @@ target_link_libraries(rocthrust

# Installation

include(GNUInstallDirs)
set(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_INCLUDEDIR})

# We need to install headers manually as rocm_install_targets
# does not support header-only libraries (INTERFACE targets)
rocm_install_targets(
Expand All @@ -55,7 +52,7 @@ rocm_install(
DIRECTORY
"./"
"${PROJECT_BINARY_DIR}/thrust/include/"
DESTINATION include/thrust
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/thrust
FILES_MATCHING
PATTERN "*.h"
PATTERN "*.cuh"
Expand Down

0 comments on commit 3530cdd

Please sign in to comment.