[Piglit] [PATCH 01/14] cmake: Add options BUILD_GLES{1,2} tests

Chad Versace chad.versace at linux.intel.com
Mon May 21 23:15:09 PDT 2012


Default value for each is OFF.

Before this patch, Piglit automatically built the GLES1 tests if libEGL
and libGLESv1_CM were found. Ditto for GLES2 and libGLESv2. If these
libraries were installed on the system, it was impossible to disable the
tests.

This patch adds options to explicitly enable the tests.

Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
---
 CMakeLists.txt                  |    4 ++++
 cmake/target_api/CMakeLists.txt |   11 +++++++++--
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5f84117..d196126 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,6 +14,10 @@ find_package(GLUT REQUIRED)
 find_package(PNG REQUIRED)
 find_package(X11)
 
+
+option(BUILD_GLES1_TESTS "Build tests for OpenGL ES1" OFF)
+option(BUILD_GLES2_TESTS "Build tests for OpenGL ES2" OFF)
+
 IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
 	option(BUILD_GLX_TESTS "Build tests that require GLX" ON)
 ELSE()
diff --git a/cmake/target_api/CMakeLists.txt b/cmake/target_api/CMakeLists.txt
index f0c0e13..b8059de 100644
--- a/cmake/target_api/CMakeLists.txt
+++ b/cmake/target_api/CMakeLists.txt
@@ -23,6 +23,13 @@
 #     Chad Versace <chad.versace at intel.com>
 
 add_subdirectory(gl)
-add_subdirectory(gles1)
-add_subdirectory(gles2)
+
+if(BUILD_GLES1_TESTS)
+	add_subdirectory(gles1)
+endif(BUILD_GLES1_TESTS)
+
+if(BUILD_GLES1_TESTS)
+	add_subdirectory(gles2)
+endif(BUILD_GLES1_TESTS)
+
 add_subdirectory(no_api)
-- 
1.7.10.1



More information about the Piglit mailing list