Skip to content

Commit 434f2cd

Browse files
committed
Properly configure hipCUB dependency
The HIP backend of MGARDX required the use of hipCUB. This is often installed with hip and will just be available, but it is not always. In the case where it is installed separately, make sure it is configured.
1 parent 58f8d40 commit 434f2cd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,12 @@ if (MGARD_ENABLE_HIP)
207207
target_compile_definitions(mgard-library PUBLIC MGARD_ENABLE_HIP)
208208
set (CMAKE_HIP_FLAGS "${CMAKE_HIP_FLAGS} -w")
209209
set_source_files_properties(${MGARD_X_HIP_SRC} PROPERTIES LANGUAGE HIP)
210+
211+
# Find the required hipCUB packages, which is usually, but not always,
212+
# installed with hip.
213+
find_package(rocprim REQUIRED CONFIG)
214+
find_package(hipcub REQUIRED CONFIG)
215+
target_link_libraries(mgard-library PUBLIC hip::hipcub)
210216
endif()
211217

212218
if (MGARD_ENABLE_SYCL)

0 commit comments

Comments
 (0)