From 0acdd2396d8e2dde162a40cba972d95b3380c80c Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Wed, 23 Oct 2013 18:46:29 +0000
Subject: [PATCH] don't warn about deprecated GLU calls for now

---
 CMakeLists.txt | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 92a3afb719..efc8a8b05d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1083,16 +1083,20 @@ endif(WIN32 OR CYGWIN)
 # force full warnings to encourage everybody to write clean(er) code
 check_cxx_compiler_flag("-Wall" WALL)
 check_cxx_compiler_flag("-Wint-to-void-pointer-cast" WCAST)
+check_cxx_compiler_flag("-Wdeprecated-declarations" WDEPREC)
 if(WALL AND NOT MSVC)
   file(GLOB_RECURSE WALL_SRC Common/*.cpp Fltk/*.cpp FunctionSpace/*.cpp
        Geo/*.cpp Graphics/*.cpp Mesh/*.cpp Numeric/*.cpp Parser/*.cpp
        Plugin/*.cpp Post/*.cpp Qt/*.cpp Solver/*.cpp)
+  set(WF "-Wall")
   if(WCAST)
-    set_source_files_properties(${WALL_SRC} PROPERTIES COMPILE_FLAGS 
-                                "-Wall -Wno-int-to-void-pointer-cast")
-  else(WCAST)
-    set_source_files_properties(${WALL_SRC} PROPERTIES COMPILE_FLAGS "-Wall")
+    set(WF "${WF} -Wno-int-to-void-pointer-cast")
   endif(WCAST)
+  if(WDEPREC)
+    # FIXME: remove this when we have fixed the deprecated GLU code for OpenGL3
+    set(WF "${WF} -Wno-deprecated-declarations")
+  endif(WDEPREC)
+  set_source_files_properties(${WALL_SRC} PROPERTIES COMPILE_FLAGS ${WF})
 endif(WALL AND NOT MSVC)
 
 # don't issue warnings for contributed libraries
-- 
GitLab