mroche / rpms / cmake

Forked from rpms/cmake 3 years ago
Clone

Blame SOURCES/cmake-strict_aliasing.patch

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