From a2de03d564cc0d1c1d5863442faf4534f9dc1f48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 22 Aug 2013 15:30:30 +0200 Subject: [PATCH] GCC 4.4 compatibility: disable strict-aliasing again. It breaks transformation computation in DebugTools::ShapeRenderer, namely DebugToolsCylinderRendererTransformationTest and DebugToolsCapsuleRendererTransformationTest tests are failing with VERY weird results. --- src/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 566f39791..02d72868f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -29,6 +29,12 @@ if(CORRADE_GCC46_COMPATIBILITY AND NOT CORRADE_GCC45_COMPATIBILITY) string(REPLACE "-pedantic" "" CORRADE_CXX_FLAGS "${CORRADE_CXX_FLAGS}") endif() +# Disable strict aliasing for GCC 4.4, as it breaks non-const Matrix[34]::up() +# etc. accessors (and I have no better solution for that yet) +if(CORRADE_GCC44_COMPATIBILITY) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing") +endif() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CORRADE_CXX_FLAGS}") include_directories( ${CMAKE_CURRENT_SOURCE_DIR}