Commit dd99e8c3 authored by COULAUD Olivier's avatar COULAUD Olivier

Better integration of FFTW with CMake

parent ffd6d769
......@@ -159,12 +159,15 @@ endif(ScalFMM_USE_BLAS)
if( ScalFMM_USE_FFT )
OPTION( ScalFMM_USE_MKL_AS_FFTW "Set to ON to use MKL FFTW" ON )
if( ScalFMM_USE_MKL_AS_FFTW )
SET(FFT_LIBRARIES "-I$ENV{MKLROOT}/include/fftw; -L$ENV{MKLROOT}/lib; -lmkl_intel_lp64; -lmkl_sequential; -lmkl_core; -lpthread; -lm" CACHE STRING "Set your MKL flags")
SET(FFT_LIBRARIES "-L$ENV{MKLROOT}/lib; -lmkl_intel_lp64; -lmkl_sequential; -lmkl_core; -lpthread; -lm" CACHE STRING "Set your MKL flags")
SET(FFT_INCLUDES "$ENV{MKLROOT}/include/fftw" CACHE STRING "Set your MKL flags")
else()
SET(FFT_LIBRARIES "-lfftw3" CACHE STRING "Use LIBFFTW")
endif()
SET(SCALFMM_LIBRARIES "${SCALFMM_LIBRARIES}; ${FFT_LIBRARIES}")
SET(SCALFMM_INCLUDES "${SCALFMM_INCLUDES}; ${FFT_INCLUDES}")
MESSAGE(STATUS "SCALFMM_LIBRARIES = ${SCALFMM_LIBRARIES}")
MESSAGE(STATUS "SCALFMM_INCLUDES = ${SCALFMM_INCLUDES}")
endif(ScalFMM_USE_FFT)
# Compile option
......@@ -301,3 +304,4 @@ INCLUDE(CPack)
MESSAGE(STATUS "CMAKE_CXX_FLAGS = ${CMAKE_CXX_FLAGS}")
MESSAGE(STATUS "ScaLFMM_CXX_FLAGS = ${ScaLFMM_CXX_FLAGS}")
MESSAGE(STATUS "SCALFMM_LIBRARIES = ${SCALFMM_LIBRARIES}")
MESSAGE(STATUS "SCALFMM_INCLUDES = ${SCALFMM_INCLUDES}")
......@@ -17,8 +17,9 @@ file(
# Adding the project sources dir as an include dir
INCLUDE_DIRECTORIES(
${CMAKE_BINARY_DIR}/Src
${CMAKE_SOURCE_DIR}/Src
${CMAKE_BINARY_DIR}/Src
${CMAKE_SOURCE_DIR}/Src
${SCALFMM_INCLUDES}
)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment