Clarify GCC+Win+AVX warning
authorRoland Schulz <roland@utk.edu>
Sat, 20 Sep 2014 16:30:33 +0000 (12:30 -0400)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Mon, 29 Sep 2014 15:41:06 +0000 (17:41 +0200)
Message was accidentally not printed for Cygwin.
Message was printed even for GCC version which are OK.

Change-Id: I4560908317919bc36f33f6e430e6b7a34853ae73

cmake/gmxTestCompilerProblems.cmake

index e534730013ce567857deb82e2bb5919e86f545f5..a8cdb870df10e7f0cfbebe22e6928e79ef0f41f7 100644 (file)
@@ -80,8 +80,11 @@ macro(gmx_test_compiler_problems)
         message(WARNING "All tested PGI compiler versions (up to 12.9.0) generate binaries which produce incorrect results, or even fail to  compile Gromacs. Highly recommended to use a different compiler. If you choose to use PGI, make sure to run the regressiontests.")
     endif()
 
-    if(CMAKE_COMPILER_IS_GNUCC AND WIN32 AND (GMX_SIMD STREQUAL "AVX_256" OR GMX_SIMD STREQUAL "AVX2_256"))
-        message(WARNING "GCC on Windows with AVX crashes. Choose SSE4_1 or a different compiler.") # GCC bug 49001.
+    if(CMAKE_COMPILER_IS_GNUCC AND
+            (CMAKE_C_COMPILER_VERSION VERSION_LESS "4.9.0" OR CMAKE_SIZEOF_VOID_P EQUAL 8)
+            AND (WIN32 OR CYGWIN)
+            AND GMX_SIMD MATCHES "AVX" AND NOT GMX_SIMD STREQUAL AVX_128_FMA)
+        message(WARNING "GCC on Windows (GCC older than 4.9 or any version when compiling for 64bit) with AVX (other than AVX_128_FMA) crashes. Choose a different GMX_SIMD or a different compiler.") # GCC bug 49001, 54412.
     endif()
 
     if(CMAKE_C_COMPILER_ID MATCHES "Clang" AND WIN32 AND NOT CYGWIN)