error out when cuFFT is not found

This commit is contained in:
Axel Kohlmeyer
2024-02-22 07:47:37 -05:00
parent 3ff2b1b43b
commit 325a7d99d6

View File

@ -140,6 +140,9 @@ if(PKG_KSPACE)
target_compile_definitions(lammps PRIVATE -DFFT_KOKKOS_KISS)
elseif(FFT_KOKKOS STREQUAL "CUFFT")
find_library(CUFFT_LIBRARY cufft)
if (CUFFT_LIBRARY STREQUAL "CUTFFT_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_KOKKOS_CUFFT)
target_link_libraries(lammps PRIVATE ${CUFFT_LIBRARY})
endif()