[Piglit] [PATCH 1/3] cmake, util: Disable MacOSX depracation warnings everywhere.

Brian Paul brianp at vmware.com
Mon Jun 8 06:47:57 PDT 2015


On 06/08/2015 06:17 AM, Jose Fonseca wrote:
> 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;
>
>

For 1 & 2,
Reviewed-by: Brian Paul <brianp at vmware.com>



More information about the Piglit mailing list