[Piglit] [PATCH] cmake: don't fail, on Linux, if X11 is not found

Dylan Baker baker.dylan.c at gmail.com
Tue Feb 16 20:12:48 UTC 2016


Quoting Mircea Gherzan (2016-02-16 10:54:30)
> If X11 is not found then GLX cannot be available, so just disable the
> building of the OpenGL test instead of hardcoding libGL/GLX as a build
> requirement. GLES tests are on by default on Linux, so the build still
> makes sense.
> 
> Signed-off-by: Mircea Gherzan <mircea.gherzan at intel.com>
> ---
>  CMakeLists.txt | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index 736677f..902ca3e 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -45,6 +45,10 @@ option(PIGLIT_BUILD_GLES2_TESTS "Build tests for OpenGL ES2" ${PIGLIT_BUILD_GLES
>  option(PIGLIT_BUILD_GLES3_TESTS "Build tests for OpenGL ES3" ${PIGLIT_BUILD_GLES_TESTS_DEFAULT})
>  option(PIGLIT_BUILD_CL_TESTS "Build tests for OpenCL" OFF)
>  
> +if((NOT X11_FOUND) AND (CMAKE_SYSTEM_NAME STREQUAL "Linux"))
> +       set(PIGLIT_BUILD_GL_TESTS OFF)
> +endif()
> +
>  if(PIGLIT_BUILD_GL_TESTS)
>         find_package(OpenGL REQUIRED)
>  endif()
> -- 
> 2.5.0
> 
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/piglit

NAK. This is throwing the baby out with the bath water. We absolutely
don't need to have X11 to run piglit tests.

The only things that rely on X11 directly are glean (which are going
away) and the EGL tests, everything else uses waffle to handle this.
It's trivial extend the guard around glean and add one around EGL in
tests/CMakeLists.txt.

Dylan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20160216/5889acce/attachment-0001.sig>


More information about the Piglit mailing list