ngompa / rpms / cmake

Forked from rpms/cmake 4 years ago
Clone
6289c6
diff -up cmake-2.8.11/Source/CMakeLists.txt\~ cmake-2.8.11/Source/CMakeLists.txt
6289c6
--- cmake-2.8.11/Source/CMakeLists.txt~	2013-05-15 19:38:13.000000000 +0200
6289c6
+++ cmake-2.8.11/Source/CMakeLists.txt	2013-07-25 16:35:01.200389140 +0200
6289c6
@@ -308,6 +308,13 @@ if(APPLE)
6289c6
     cmLocalXCodeGenerator.h)
6289c6
 endif()
6289c6
 
6289c6
+# GCC shows strict aliasing warnings with cm_sha2.c.  Turn off the
6289c6
+# corresponding optimizations.
6289c6
+if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUCC)
6289c6
+  set_source_files_properties(cm_sha2.c PROPERTIES
6289c6
+			      COMPILE_FLAGS "-fno-strict-aliasing")
6289c6
+endif()
6289c6
+
6289c6
 
6289c6
 if (WIN32)
6289c6
   set(SRCS ${SRCS}
6289c6
6289c6
Diff finished.  Thu Jul 25 16:35:18 2013