From f050eab3bd80d839dd1700b51b18a84a3048e571 Mon Sep 17 00:00:00 2001 From: Manuel Nickschas Date: Sun, 23 Aug 2009 14:31:28 +0200 Subject: [PATCH] Add -fno-strict-aliasing to CFLAGS Apparently Qt < 4.6 breaks strict aliasing rules, which makes gcc-4.4 complain loudly when compiling Quassel (and possibly leads to spurious errors). Hence, for now we disable strict aliasing. --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a45928a9..0271a364 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -103,7 +103,8 @@ endif(NOT CMAKE_BUILD_TYPE) # Enable various flags on gcc if(CMAKE_COMPILER_IS_GNUCXX) # Let's just hope that all gccs support these options and skip the tests... - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ansi -Wall -Wextra -Wnon-virtual-dtor") + # -fno-strict-aliasing is needed apparently for Qt < 4.6 + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ansi -Wall -Wextra -Wnon-virtual-dtor -fno-strict-aliasing") set(CMAKE_CXX_FLAGS_RELWITHDEBUGINFO "-O2") set(CMAKE_CXX_FLAGS_DEBUG "-g -fno-reorder-blocks -fno-schedule-insns -fno-inline") set(CMAKE_CXX_FLAGS_DEBUGFULL "-g3") -- 2.20.1