Add initial support for python bindings
[alexxy/gromacs.git] / cmake / gmxManageFFTLibraries.cmake
index 3edd654a0ebf280d8571ce431d337e5cf9218510..104576d4b3a6c3932f1df3e88ee62a6e2eaa33a0 100644 (file)
@@ -73,11 +73,15 @@ if(${GMX_FFT_LIBRARY} STREQUAL "FFTW3")
 
     string(TOUPPER "${FFTW}" FFTW)
     if(NOT ${FFTW}_FOUND)
-      MESSAGE(FATAL_ERROR "Cannot find FFTW 3 (with correct precision - libfftw3f for single-precision GROMACS or libfftw3 for double-precision GROMACS). Either choose the right precision, choose another FFT(W) library (-DGMX_FFT_LIBRARY), enable the advanced option to let GROMACS build FFTW 3 for you (-GMX_BUILD_OWN_FFTW=ON), or use the really slow GROMACS built-in fftpack library (-DGMX_FFT_LIBRARY=fftpack).")
+      MESSAGE(FATAL_ERROR "Cannot find FFTW 3 (with correct precision - libfftw3f for mixed-precision GROMACS or libfftw3 for double-precision GROMACS). Either choose the right precision, choose another FFT(W) library (-DGMX_FFT_LIBRARY), enable the advanced option to let GROMACS build FFTW 3 for you (-GMX_BUILD_OWN_FFTW=ON), or use the really slow GROMACS built-in fftpack library (-DGMX_FFT_LIBRARY=fftpack).")
     endif()
 
     set(PKG_FFT "${${FFTW}_PKG}")
-    include_directories(${${FFTW}_INCLUDE_DIRS})
+    if (GMX_BUILD_OWN_FFTW)
+        include_directories(BEFORE ${${FFTW}_INCLUDE_DIRS})
+    else()
+        include_directories(${${FFTW}_INCLUDE_DIRS})
+    endif()
     set(FFT_LIBRARIES ${${FFTW}_LIBRARIES})
     set(GMX_FFT_FFTW3 1)
 
@@ -147,9 +151,9 @@ elseif(${GMX_FFT_LIBRARY} STREQUAL "MKL")
 elseif(${GMX_FFT_LIBRARY} STREQUAL "FFTPACK")
     set(GMX_FFT_FFTPACK 1)
     set(FFT_STATUS_MESSAGE "Using internal FFT library - fftpack")
-else(${GMX_FFT_LIBRARY} STREQUAL "FFTW3")
+else()
     gmx_invalid_option_value(GMX_FFT_LIBRARY)
-endif(${GMX_FFT_LIBRARY} STREQUAL "FFTW3")
+endif()
 gmx_check_if_changed(FFT_CHANGED GMX_FFT_LIBRARY)
 if (FFT_CHANGED)
     message(STATUS "${FFT_STATUS_MESSAGE}")