From 75973091890325813e0d4adb50e525d52bdd5816 Mon Sep 17 00:00:00 2001 From: Mark Abraham Date: Wed, 19 Jul 2017 09:30:31 +0200 Subject: [PATCH] Fix use of GMX_SIMD in own-fftw build Recent change separated the variables that contain the user's input from the resulting action, but this aspect of the behaviour was missed. Change-Id: I8881e08ac8deb818f86c0db737beedeea77e4a5b --- src/contrib/fftw/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/contrib/fftw/CMakeLists.txt b/src/contrib/fftw/CMakeLists.txt index 2037f62ec2..620caed6fa 100644 --- a/src/contrib/fftw/CMakeLists.txt +++ b/src/contrib/fftw/CMakeLists.txt @@ -60,14 +60,14 @@ endif() # Set library optimizations set(_fftw_simd_support_level "") -if(${GMX_SIMD} MATCHES "^(SSE|AVX)" AND APPLE) +if(${GMX_SIMD_ACTIVE} 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") -elseif(${GMX_SIMD} MATCHES "^(SSE)") +elseif(${GMX_SIMD_ACTIVE} MATCHES "^(SSE)") set(_fftw_simd_support_level "--enable-sse2") -elseif(${GMX_SIMD} MATCHES "^(AVX)") +elseif(${GMX_SIMD_ACTIVE} MATCHES "^(AVX)") # Testing shows FFTW configured with --enable-sse2 --enable-avx is # slightly faster on most architectures than --enable-sse2 alone. # Support for --enable-avx2 was only added in 3.3.5, but @@ -82,7 +82,7 @@ if(MSVC OR (CMAKE_COMPILER_IS_GNUCC AND CMAKE_C_COMPILER_VERSION VERSION_LESS 4. else() set(_fftw_simd_support_level --enable-sse2;--enable-avx;--enable-avx2;--enable-avx512) endif() -elseif(${GMX_SIMD} MATCHES "^(VSX)") +elseif(${GMX_SIMD_ACTIVE} MATCHES "^(VSX)") set(_fftw_simd_support_level --enable-vsx) endif() set(GMX_BUILD_OWN_FFTW_OPTIMIZATION_CONFIGURATION ${_fftw_simd_support_level} CACHE INTERNAL "Optimization flags for FFTW compilation") -- 2.11.4.GIT