[Piglit] [PATCH 2/4] cmake: workaround cmake bug when GLUT is not found

Jose Fonseca jfonseca at vmware.com
Wed Feb 29 03:03:54 PST 2012


Looks good to me.

Jose

----- Original Message -----
> Silences thousands of lines of spam.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42700
> ---
>  CMakeLists.txt |   14 ++++++++++++++
>  1 files changed, 14 insertions(+), 0 deletions(-)
> 
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index 7c31173..d56fd8c 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -13,6 +13,20 @@ find_package(GLUT REQUIRED)
>  find_package(PNG REQUIRED)
>  find_package(X11)
> 
> +# The 'REQUIRED' above correctly produces an error for
> +# OpenGL and PNG, but there's a bug involving FindGLUT.cmake
> +# that fails to produce the error as of CMake 2.8.5.
> +#
> +# Instead, CMake keeps going and eventually spams
> +# the console with a message for every target that used
> +# e.g. the ${GLUT_INCLUDE_DIR} variable. So it
> +# prints a line for basically every single test in piglit.
> +#
> +# Work around the bug and error out quickly here instead.
> +if (NOT GLUT_FOUND)
> +	message(FATAL_ERROR "GLUT library not found")
> +endif()
> +
>  # Check for presence of Python 2.6 or greater.
>  foreach(python_cmd python2 python)
>  	execute_process(
> --
> 1.7.4.1
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
> 


More information about the Piglit mailing list