add cuFFT presence error check to CMake script

This commit is contained in:
Axel Kohlmeyer
2024-02-24 03:41:45 -05:00
parent a7aacd2440
commit 6203c18ef0

View File

@ -133,6 +133,9 @@ if(PKG_KSPACE)
if(Kokkos_ENABLE_CUDA)
if(NOT (FFT STREQUAL "KISS"))
find_library(CUFFT_LIBRARY cufft)
if (CUFFT_LIBRARY STREQUAL "CUFFT_LIBRARY-NOTFOUND")
message(FATAL_ERROR "Required cuFFT library not found. Check your environment or set CUFFT_LIBRARY to its location")
endif()
target_compile_definitions(lammps PRIVATE -DFFT_CUFFT)
target_link_libraries(lammps PRIVATE ${CUFFT_LIBRARY})
endif()