Fix OS X FFTW build failures introduced 86a772
authorErik Lindahl <erik@kth.se>
Mon, 15 Jun 2015 09:16:49 +0000 (11:16 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Mon, 15 Jun 2015 22:52:55 +0000 (00:52 +0200)
The two avx/sse options needs to be a list, and
since FFTW always picks gcc by default we need
to disable FFTW AVX regardless of the compiler.

Change-Id: Ie82d7cc85de0715d5f2dd7a6198af079575fe891

src/contrib/fftw/CMakeLists.txt

index 8d594f6f8b7c715cdd760889141eaa4351d2e86e..a39af0b5ab6b61c5ce781fe571559c494b852bd0 100644 (file)
@@ -60,8 +60,8 @@ endif()
 
 # Set library optimizations
 set(_fftw_simd_support_level "")
-if(${GMX_SIMD} MATCHES "^(SSE|AVX)" AND APPLE AND "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
-    # OS X with gcc and --enable-avx causes compilation issues. It's
+if(${GMX_SIMD} MATCHES "^(SSE|AVX)" AND APPLE)
+    # OS X and --enable-avx causes compilation issues (fftw always picks gcc by default). It's
     # not an important enough performance loss to bother warning the
     # user about.
     set(_fftw_simd_support_level "--enable-sse2")
@@ -70,7 +70,7 @@ elseif(${GMX_SIMD} MATCHES "^(SSE)")
 elseif(${GMX_SIMD} MATCHES "^(AVX)")
     # Testing shows FFTW configured with --enable-sse2 --enable-avx is
     # slightly faster on most architectures than --enable-sse2 alone
-    set(_fftw_simd_support_level "--enable-sse2 --enable-avx")
+    set(_fftw_simd_support_level --enable-sse2;--enable-avx)
 endif()
 set(GMX_BUILD_OWN_FFTW_OPTIMIZATION_CONFIGURATION ${_fftw_simd_support_level} CACHE INTERNAL "Optimization flags for FFTW compilation")