Fix FFTW build
authorPaul Bauer <paul.bauer.q@gmail.com>
Sat, 15 Dec 2018 16:19:37 +0000 (17:19 +0100)
committerSzilárd Páll <pall.szilard@gmail.com>
Mon, 17 Dec 2018 20:59:56 +0000 (21:59 +0100)
Fixed the build with GMX_BUILD_OWN_FFTW terminating with a linker issue.

Fixes #2809

Change-Id: Ie1323601da220bf28d7cb00d33b520b66d9de05f

cmake/gmxManageFFTLibraries.cmake

index b05ec2b6b10bcab9605847d05d3a9c433a74e7da..9c83331a34b14f2b6c0fef9bb747097b5cada64b 100644 (file)
@@ -112,10 +112,12 @@ if(${GMX_FFT_LIBRARY} STREQUAL "FFTW3")
             set(GMX_FFT_ARMPL_FFTW3 1)
             set(FFT_STATUS_MESSAGE "Using external FFT library - ARM Performance Library (FFTW3 compatibility mode)")
         else()
-            set(GMX_FFT_FFTW3 1)
             set(FFT_STATUS_MESSAGE "Using external FFT library - FFTW3")
         endif()
     endif()
+    if (NOT GMX_FFT_ARMPL_FFTW3)
+        set(GMX_FFT_FFTW3 1)
+    endif()
 
     set(FFT_LIBRARIES ${${FFTW}_LIBRARIES})
 elseif(${GMX_FFT_LIBRARY} STREQUAL "MKL")