Set upper case of FFTW variable at the right place.
authorMagnus Lundborg <lundborg.magnus@gmail.com>
Sun, 1 Sep 2013 11:38:42 +0000 (13:38 +0200)
committerMagnus Lundborg <lundborg.magnus@gmail.com>
Mon, 2 Sep 2013 06:41:36 +0000 (08:41 +0200)
Fixes #1327

Change-Id: Ie9ef1fffceefef7d46f1e7a5a8ca3ceb22a81854

CMakeLists.txt

index f6a45a83e440bf2cca0aec973c70f6b3215a4f2b..82ff7629716f3ba9dbcb2ac700b95dfeae547d78 100644 (file)
@@ -911,11 +911,12 @@ if(${GMX_FFT_LIBRARY} STREQUAL "FFTW3")
     else()
       find_package(FFTW COMPONENTS ${FFTW})
     endif()
+
+    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 (-DGMX_BUILD_OWN_FFTW=ON) , or use the really slow GROMACS built-in fftpack library (-DGMX_FFT_LIBRARY=fftpack).")
     endif()
 
-    string(TOUPPER "${FFTW}" FFTW)
     set(PKG_FFT "${${FFTW}_PKG}")
     include_directories(${${FFTW}_INCLUDE_DIRS})
     set(FFT_LIBRARIES ${${FFTW}_LIBRARIES})