forked from lijiext/lammps
cmake: fftw is now a private dep
This commit is contained in:
parent
58b304be62
commit
6f0a56c176
|
@ -541,8 +541,6 @@ if(BUILD_SHARED_LIBS)
|
|||
configure_file(pkgconfig/liblammps.pc.in ${CMAKE_CURRENT_BINARY_DIR}/liblammps${LAMMPS_MACHINE}.pc @ONLY)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/liblammps${LAMMPS_MACHINE}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||
install(EXPORT LAMMPS_Targets FILE LAMMPS_Targets.cmake NAMESPACE LAMMPS:: DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/LAMMPS)
|
||||
file(GLOB MODULE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/Modules/Find*.cmake)
|
||||
install(FILES ${MODULE_FILES} DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/LAMMPS)
|
||||
include(CMakePackageConfigHelpers)
|
||||
configure_file(LAMMPSConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/LAMMPSConfig.cmake @ONLY)
|
||||
write_basic_package_version_file("LAMMPSConfigVersion.cmake" VERSION ${PROJECT_VERSION} COMPATIBILITY ExactVersion)
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
|
||||
include(CMakeFindDependencyMacro)
|
||||
if(@BUILD_MPI@)
|
||||
find_dependency(MPI REQUIRED CXX)
|
||||
endif()
|
||||
if(@PKG_KSPACE@)
|
||||
if(@FFT@ STREQUAL "FFTW3")
|
||||
find_dependency(@FFTW@ REQUIRED MODULE)
|
||||
endif()
|
||||
endif()
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/LAMMPS_Targets.cmake")
|
||||
|
|
|
@ -2,7 +2,7 @@ option(FFT_SINGLE "Use single precision FFTs instead of double precision FFTs" O
|
|||
set(FFTW "FFTW3")
|
||||
if(FFT_SINGLE)
|
||||
set(FFTW "FFTW3F")
|
||||
target_compile_definitions(lammps PUBLIC -DFFT_SINGLE)
|
||||
target_compile_definitions(lammps PRIVATE -DFFT_SINGLE)
|
||||
endif()
|
||||
find_package(${FFTW} QUIET)
|
||||
if(${FFTW}_FOUND)
|
||||
|
@ -17,8 +17,8 @@ string(TOUPPER ${FFT} FFT)
|
|||
|
||||
if(FFT STREQUAL "FFTW3")
|
||||
find_package(${FFTW} REQUIRED)
|
||||
target_compile_definitions(lammps PUBLIC -DFFT_FFTW3)
|
||||
target_link_libraries(lammps PUBLIC ${FFTW}::${FFTW})
|
||||
target_compile_definitions(lammps PRIVATE -DFFT_FFTW3)
|
||||
target_link_libraries(lammps PRIVATE ${FFTW}::${FFTW})
|
||||
if(FFTW3_OMP_LIBRARY OR FFTW3F_OMP_LIBRARY)
|
||||
option(FFT_FFTW_THREADS "Use threaded FFTW library" ON)
|
||||
else()
|
||||
|
|
Loading…
Reference in New Issue