[Piglit] [PATCH 1/3] cmake, util: Disable MacOSX depracation warnings everywhere.
Jose Fonseca
jfonseca at vmware.com
Mon Jun 8 05:17:33 PDT 2015
They can be quite distracting.
---
CMakeLists.txt | 8 ++++++++
tests/util/piglit-framework-gl/piglit_glut_framework.c | 5 -----
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bcf6ea2..edb5997 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -300,6 +300,14 @@ if (WIN32)
add_definitions (-D_USE_MATH_DEFINES)
endif (WIN32)
+if (APPLE)
+ # Don't warn about using deprecated OpenGL/GLU/GLUT functions.
+ # TODO: It would be nice to silence just the deprecation macros from
+ # OpenGLAvailability.h as opposed to all deprecated functions.
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-deprecated-declarations")
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
+endif ()
+
if (OPENGL_FOUND)
if (APPLE)
find_path(GLEXT_INCLUDE_DIR
diff --git a/tests/util/piglit-framework-gl/piglit_glut_framework.c b/tests/util/piglit-framework-gl/piglit_glut_framework.c
index dd5eaae..075ee0d 100644
--- a/tests/util/piglit-framework-gl/piglit_glut_framework.c
+++ b/tests/util/piglit-framework-gl/piglit_glut_framework.c
@@ -29,11 +29,6 @@
#include "piglit_glut_framework.h"
#include "piglit-util-gl.h"
-/* Don't warn about using deprecated GLUT functions. */
-#ifdef __APPLE__
-# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-#endif
-
struct piglit_glut_framework {
struct piglit_gl_framework gl_fw;
--
2.1.0
More information about the Piglit
mailing list