Anonymous avatar Anonymous committed 3e976d7

DEV-41410 SNOW-204: merging this snowglobe fix into viewer-2.0.0-3.
Provides more robust gcc version checking for suppressing warnings.

Comments (0)

Files changed (2)

doc/contributions.txt

 	CT-231
 	CT-321
 Robin Cornelius
+	SNOW-204
 	VWR-2488
 	VWR-9557
 	VWR-11128

indra/cmake/00-Common.cmake

     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.
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.