Blob Blame History Raw
diff -up gromacs-bec9c8757e59cae58fc61ed841c0bb73c84079db/cmake/gmxCFlags.cmake.gtest705 gromacs-bec9c8757e59cae58fc61ed841c0bb73c84079db/cmake/gmxCFlags.cmake
--- gromacs-bec9c8757e59cae58fc61ed841c0bb73c84079db/cmake/gmxCFlags.cmake.gtest705	2016-03-18 16:05:26.000000000 +0100
+++ gromacs-bec9c8757e59cae58fc61ed841c0bb73c84079db/cmake/gmxCFlags.cmake	2016-03-21 19:37:46.623380637 +0100
@@ -123,6 +123,9 @@ macro (gmx_c_flags)
         GMX_TEST_CFLAG(CFLAGS_COPT "-funroll-all-loops"
                        GMXC_CFLAGS_RELEASE)
         GMX_TEST_CFLAG(CFLAGS_NOINLINE "-fno-inline" GMXC_CFLAGS_DEBUG)
+        # Workaround GTest bug https://github.com/google/googletest/issues/705.
+        GMX_TEST_CFLAG(CFLAGS_NO_DEL_NULL "-fno-delete-null-pointer-checks"
+                       GMXC_CFLAGS_RELEASE)
     endif()
     # g++
     if(CMAKE_COMPILER_IS_GNUCXX)
@@ -142,6 +145,9 @@ macro (gmx_c_flags)
         GMX_TEST_CXXFLAG(CXXFLAGS_COPT "-funroll-all-loops"
                          GMXC_CXXFLAGS_RELEASE)
         GMX_TEST_CXXFLAG(CXXFLAGS_NOINLINE "-fno-inline" GMXC_CXXFLAGS_DEBUG)
+        # Workaround GTest bug https://github.com/google/googletest/issues/705.
+        GMX_TEST_CXXFLAG(CXXFLAGS_NO_DEL_NULL "-fno-delete-null-pointer-checks"
+                       GMXC_CXXFLAGS_RELEASE)
     endif()
 
     # icc