From 83240c0e2a7563ef466d9ec9e0727e3c02037efb Mon Sep 17 00:00:00 2001 From: Hannes Vogt Date: Thu, 6 Aug 2020 10:11:15 +0200 Subject: [PATCH] Fix: storage_gpu for HIPCC-AMDGPU (#1540) --- cmake/public/gridtools_setup_targets.cmake | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmake/public/gridtools_setup_targets.cmake b/cmake/public/gridtools_setup_targets.cmake index 02ce276ee2..131990a106 100644 --- a/cmake/public/gridtools_setup_targets.cmake +++ b/cmake/public/gridtools_setup_targets.cmake @@ -249,9 +249,12 @@ macro(_gt_setup_targets _config_mode clang_cuda_mode) endif() find_package(CUDAToolkit) - if(CUDAToolkit_FOUND) + if(CUDAToolkit_FOUND OR GT_CUDA_TYPE STREQUAL HIPCC-AMDGPU) _gt_add_library(${_config_mode} storage_gpu) - target_link_libraries(${_gt_namespace}storage_gpu INTERFACE ${_gt_namespace}gridtools CUDA::cudart) + target_link_libraries(${_gt_namespace}storage_gpu INTERFACE ${_gt_namespace}gridtools) + if(CUDAToolkit_FOUND) + target_link_libraries(${_gt_namespace}storage_gpu INTERFACE CUDA::cudart) + endif() list(APPEND GT_STORAGES gpu) endif()