Skip to content
Snippets Groups Projects
Commit f0193202 authored by Martin Reddy's avatar Martin Reddy
Browse files

DEV-41410 SNOW-204: merging this snowglobe fix into viewer-2.0.0-3.

Provides more robust gcc version checking for suppressing warnings.
parent 7aa859b7
No related branches found
No related tags found
No related merge requests found
......@@ -497,6 +497,7 @@ Ringo Tuxing
CT-231
CT-321
Robin Cornelius
SNOW-204
VWR-2488
VWR-9557
VWR-11128
......
......@@ -118,14 +118,15 @@ if (LINUX)
endif (NOT ${GXX_VERSION} MATCHES " 4.1.*Red Hat")
endif (${GXX_VERSION} STREQUAL ${CXX_VERSION})
# GCC 4.3 introduces a pile of obnoxious new warnings, which we
# treat as errors due to -Werror. Quiet the most offensive and
# widespread of them.
# Let's actually get a numerical version of gxx's version
STRING(REGEX REPLACE ".* ([0-9])\\.([0-9])\\.([0-9]).*" "\\1\\2\\3" CXX_VERSION ${CXX_VERSION})
if (${CXX_VERSION} MATCHES "4.3")
# gcc 4.3 and above don't like the LL boost and also
# cause warnings due to our use of deprecated headers
if(${CXX_VERSION} GREATER 429)
add_definitions(-Wno-parentheses)
set(CMAKE_CXX_FLAGS "-Wno-deprecated ${CMAKE_CXX_FLAGS}")
endif (${CXX_VERSION} MATCHES "4.3")
endif (${CXX_VERSION} GREATER 429)
# End of hacks.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment