[Piglit] [PATCH] cmake: Only build GLES tests by default on systems which support EGL.

Jose Fonseca jfonseca at vmware.com
Mon Jun 8 05:43:27 PDT 2015


GLES tests require EGL support, so it only make sense that they are on
on systems which support EGL, which is Linux ATM.
---
 CMakeLists.txt | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index edb5997..3ae892d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -35,10 +35,16 @@ if(X11_FOUND)
 	add_definitions(-DPIGLIT_HAS_X11)
 endif()
 
+if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+	set(PIGLIT_BUILD_GLES_TESTS_DEFAULT ON)
+else()
+	set(PIGLIT_BUILD_GLES_TESTS_DEFAULT OFF)
+endif()
+
 option(PIGLIT_BUILD_GL_TESTS "Build tests for OpenGL" ON)
-option(PIGLIT_BUILD_GLES1_TESTS "Build tests for OpenGL ES1" ON)
-option(PIGLIT_BUILD_GLES2_TESTS "Build tests for OpenGL ES2" ON)
-option(PIGLIT_BUILD_GLES3_TESTS "Build tests for OpenGL ES3" ON)
+option(PIGLIT_BUILD_GLES1_TESTS "Build tests for OpenGL ES1" ${PIGLIT_BUILD_GLES_TESTS_DEFAULT})
+option(PIGLIT_BUILD_GLES2_TESTS "Build tests for OpenGL ES2" ${PIGLIT_BUILD_GLES_TESTS_DEFAULT})
+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(PIGLIT_BUILD_GL_TESTS)
-- 
2.1.0



More information about the Piglit mailing list