Skip to content

Commit

Permalink
Make platform_cuda_legacy depend on CUDA::cudart
Browse files Browse the repository at this point in the history
  • Loading branch information
ye-luo committed Sep 30, 2021
1 parent 81457ad commit ebf7849
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Platforms/CUDA/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ set(CUDA_LA_SRCS cuBLAS_missing_functions.cu)

if(NOT QMC_CUDA2HIP)
add_library(platform_cuda_runtime ${CUDA_RT_SRCS})
target_link_libraries(platform_cuda_runtime PUBLIC CUDA::cudart)
add_library(platform_cuda_LA ${CUDA_LA_SRCS})
target_link_libraries(platform_cuda_LA PRIVATE CUDA::cublas CUDA::cusolver)
target_link_libraries(platform_cuda_runtime PUBLIC CUDA::cudart)
else()
hip_add_library(platform_cuda_runtime ${CUDA_RT_SRCS})
target_link_libraries(platform_cuda_LA PUBLIC platform_rocm_LA)
hip_add_library(platform_cuda_LA ${CUDA_LA_SRCS})
target_link_libraries(platform_cuda_runtime PUBLIC platform_rocm_runtime)
target_link_libraries(platform_cuda_LA PUBLIC platform_rocm_LA)
endif()

target_link_libraries(platform_cuda_LA PRIVATE platform_cuda_runtime)
2 changes: 1 addition & 1 deletion src/Platforms/CUDA_legacy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ set(CUDA_LEGACY_SRCS cuda_inverse.cu gpu_vector.cpp gpu_misc.cpp)

if(NOT QMC_CUDA2HIP)
add_library(platform_cuda_legacy ${CUDA_LEGACY_SRCS})
target_link_libraries(platform_cuda_legacy PUBLIC CUDA::cublas)
target_link_libraries(platform_cuda_legacy PUBLIC CUDA::cublas CUDA::cudart)
else()
hip_add_library(platform_cuda_legacy ${CUDA_LEGACY_SRCS})
target_link_libraries(platform_cuda_legacy PUBLIC platform_rocm_runtime platform_rocm_LA)
Expand Down

0 comments on commit ebf7849

Please sign in to comment.