Skip to content
Snippets Groups Projects
Commit 926c2be9 authored by marco's avatar marco
Browse files

turn off strict aliasing rules for gcc 4.4

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@1914 5a81b35b-ba03-0410-adc8-b2c5c5119f08
parent 7bd977ae
No related branches found
No related tags found
No related merge requests found
......@@ -156,6 +156,13 @@ endfunction()
if (CMAKE_COMPILER_IS_GNUCXX)
get_compiler_version(_GCC_VERSION)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
if (_GCC_VERSION MATCHES "44")
# gcc 4.4. is very strict about aliasing rules. the shared_count
# implementation that is used boost's shared_ptr violates these rules. To
# silence the warnings and prevent miscompiles, enable
# -fno-strict-aliasing
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing")
endif()
if (APPLE AND NOT _GCC_VERSION MATCHES "42")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
endif()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment