Skip to content

Commit

Permalink
Link libcudart even when libcurand is not used
Browse files Browse the repository at this point in the history
  • Loading branch information
fwyzard authored and psychocoderHPC committed Aug 1, 2024
1 parent 9c86141 commit a9217fb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmake/alpakaCommon.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -542,9 +542,12 @@ if(alpaka_ACC_GPU_CUDA_ENABLE)
endif()
endif()

# Link the CUDA Runtime library
target_link_libraries(alpaka INTERFACE CUDA::cudart)

if(NOT alpaka_DISABLE_VENDOR_RNG)
# Use cuRAND random number generators
target_link_libraries(alpaka INTERFACE CUDA::cudart CUDA::curand)
target_link_libraries(alpaka INTERFACE CUDA::curand)
endif()
else()
message(FATAL_ERROR "Optional alpaka dependency CUDA could not be found!")
Expand Down

0 comments on commit a9217fb

Please sign in to comment.