forked from lijiext/lammps
make FFT a selective option
This commit is contained in:
parent
01bcb79bdc
commit
488609a5fd
|
@ -123,15 +123,14 @@ if(ENABLE_USER-OMP OR ENABLE_KOKKOS OR ENABLE_USER-INTEL)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_KSPACE)
|
if(ENABLE_KSPACE)
|
||||||
foreach(FFT FFTW3 MKL FFTW2)
|
set(FFT "KISSFFT" CACHE STRING "FFT library for KSPACE package")
|
||||||
find_package(${FFT})
|
set_property(CACHE FFT PROPERTY STRINGS KISSFFT FFTW3 MKL FFTW2)
|
||||||
if(${FFT}_FOUND)
|
if(NOT FFT STREQUAL "KISSFFT")
|
||||||
add_definitions(-DFFT_${FFT})
|
find_package(${FFT} REQUIRED)
|
||||||
include_directories(${${FFT}_INCLUDE_DIRS})
|
add_definitions(-DFFT_${FFT})
|
||||||
list(APPEND LAMMPS_LINK_LIBS ${${FFT}_LIBRARIES})
|
include_directories(${${FFT}_INCLUDE_DIRS})
|
||||||
break()
|
list(APPEND LAMMPS_LINK_LIBS ${${FFT}_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
|
||||||
set(PACK_OPTIMIZATION "PACK_ARRAY" CACHE STRING "Optimization for FFT")
|
set(PACK_OPTIMIZATION "PACK_ARRAY" CACHE STRING "Optimization for FFT")
|
||||||
set_property(CACHE LAMMPS_SIZE_LIMIT PROPERTY STRINGS PACK_ARRAY PACK_POINTER PACK_MEMCPY)
|
set_property(CACHE LAMMPS_SIZE_LIMIT PROPERTY STRINGS PACK_ARRAY PACK_POINTER PACK_MEMCPY)
|
||||||
if(NOT PACK_OPTIMIZATION STREQUAL "PACK_ARRAY")
|
if(NOT PACK_OPTIMIZATION STREQUAL "PACK_ARRAY")
|
||||||
|
|
Loading…
Reference in New Issue