Browse Source

Disable strict-aliasing warnings for GCC 4.5.

The current warnings are harmless and just pollute the output, not
present in GCC >= 4.6, thus I don't bother.
Vladimír Vondruš 13 years ago
parent
commit
f3bfeb1813
  1. 6
      src/CMakeLists.txt

6
src/CMakeLists.txt

@ -40,6 +40,12 @@ endif()
# etc. accessors (and I have no better solution for that yet)
if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND NOT "${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "4.8.0") OR CORRADE_GCC44_COMPATIBILITY)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing")
# For GCC 4.5 disable just the strict-aliasing warnings. They are mostly
# harmless and are just polluting the output. In case they aren't harmless
# anymore the strict-aliasing should be disabled here too.
elseif(CORRADE_GCC45_COMPATIBILITY AND NOT CORRADE_GCC44_COMPATIBILITY)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-strict-aliasing")
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CORRADE_CXX_FLAGS}")

Loading…
Cancel
Save