summaryrefslogtreecommitdiff
path: root/indra/cmake/00-Common.cmake
diff options
context:
space:
mode:
authorMartin Reddy <lynx@lindenlab.com>2009-10-16 14:35:24 +0000
committerMartin Reddy <lynx@lindenlab.com>2009-10-16 14:35:24 +0000
commitf0193202c5caa1d9b9f9ba28bc6a931092d71622 (patch)
tree16cf5862fc627553e2969ae170eb54b00309763d /indra/cmake/00-Common.cmake
parent7aa859b7f4212e0e8177539284eaef6dfad57d94 (diff)
DEV-41410 SNOW-204: merging this snowglobe fix into viewer-2.0.0-3.
Provides more robust gcc version checking for suppressing warnings.
Diffstat (limited to 'indra/cmake/00-Common.cmake')
-rw-r--r--indra/cmake/00-Common.cmake11
1 files changed, 6 insertions, 5 deletions
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index b168c08552..173e650961 100644
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -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.