Renamed bonded module as 'listed-forces'
[alexxy/gromacs.git] / cmake / gmxGCC44O3BugWorkaround.cmake
index 5578b85d5314dc6b61ec4131801440feeb14f38e..a71d88f99b476158900073b11a6a004b81ceb1ea 100644 (file)
@@ -1,10 +1,10 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2012, by the GROMACS development team, led by
-# David van der Spoel, Berk Hess, Erik Lindahl, and including many
-# others, as listed in the AUTHORS file in the top-level source
-# directory and at http://www.gromacs.org.
+# Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+# Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+# and including many others, as listed in the AUTHORS file in the
+# top-level source directory and at http://www.gromacs.org.
 #
 # GROMACS is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public License
@@ -31,8 +31,8 @@
 #
 # To help us fund GROMACS development, we humbly ask that you cite
 # the research papers on the package. Check out http://www.gromacs.org.
-#
-# Due to a bug, gcc 4.4.x crashes when compiling bondfree.c with -O3 and
+
+# Due to a bug, gcc 4.4.x crashes when compiling listed-forces/bonded.cpp with -O3 and
 # -fopenmp, but strangely it does not crash with -O2 + all additional options.
 # -O3 uses. Therefore, for the affected files, when compiling in release mode,
 # we override -O3 with -O2 and add the additional option.
@@ -42,7 +42,7 @@
 # is needed to avoid gcc crash.
 macro(gmx_check_gcc44_bug_workaround_needed OUT_VAR)
     if(CMAKE_COMPILER_IS_GNUCC AND
-    C_COMPILER_VERSION VERSION_GREATER "4.3.999" AND C_COMPILER_VERSION VERSION_LESS "4.4.999")
+    CMAKE_C_COMPILER_VERSION VERSION_GREATER "4.3.999" AND CMAKE_C_COMPILER_VERSION VERSION_LESS "4.4.999")
 
         set(_gcc44_workaround FALSE)
 
@@ -51,9 +51,9 @@ macro(gmx_check_gcc44_bug_workaround_needed OUT_VAR)
         if ("${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${_build_type}}" MATCHES ".*-O3.*" AND
             GMX_OPENMP)
             if(GMX_DISABLE_GCC44_BUG_WORKAROUND)
-                set(_msg "gcc ${C_COMPILER_VERSION} detected, using -O3, but workaround for optimization bug is disabled")
+                set(_msg "gcc ${CMAKE_C_COMPILER_VERSION} detected, using -O3, but workaround for optimization bug is disabled")
             else()
-                set(_msg "gcc ${C_COMPILER_VERSION} detected, using -O3, will apply workaround for optimization bug (disable with GMX_DISABLE_GCC44_BUG_WORKAROUND)")
+                set(_msg "gcc ${CMAKE_C_COMPILER_VERSION} detected, using -O3, will apply workaround for optimization bug (disable with GMX_DISABLE_GCC44_BUG_WORKAROUND)")
                 set(_gcc44_workaround TRUE)
             endif()
             # only issues message if the value has changed