cmake: Add switch for vs_in_64 generator

Submitted by Dylan Baker on Aug. 31, 2017, 12:33 a.m.

Details

Message ID 20170831003358.24571-1-dylan@pnwbakers.com
State New
Headers show
Series "cmake: Add switch for vs_in_64 generator" ( rev: 1 ) in Piglit

Not browsing as part of any series.

Commit Message

Dylan Baker Aug. 31, 2017, 12:33 a.m.
This generator takes a long time to run and produces several Gbs of
tests. The right solution in the long term might be to replace the
generator with a C/C++ based solution that generates tests on the fly,
but for now adding a switch to turn it off can help in many situations.

This switch defaults to on so that the default behavior doesn't change.
---
 CMakeLists.txt                 |  1 +
 generated_tests/CMakeLists.txt | 10 ++++++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4259ec832..88398dc68 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -44,6 +44,7 @@  option(PIGLIT_BUILD_GLES1_TESTS "Build tests for OpenGL ES1" ${PIGLIT_BUILD_GLES
 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)
+option(PIGLIT_BUILD_LARGE_GENERATORS "Run generators that produces Gbs of tests" ON)
 
 if(PIGLIT_BUILD_GL_TESTS)
 	find_package(OpenGL REQUIRED)
diff --git a/generated_tests/CMakeLists.txt b/generated_tests/CMakeLists.txt
index fe82ccfa4..cd0f288a5 100644
--- a/generated_tests/CMakeLists.txt
+++ b/generated_tests/CMakeLists.txt
@@ -107,7 +107,6 @@  piglit_make_generated_tests(
 	gen_outerproduct_tests.py
 	templates/gen_outerproduct_tests/template.shader_test.mako
 	)
-
 piglit_make_generated_tests(
 	builtin_uniform_tests_fp64.list
 	gen_builtin_uniform_tests_fp64.py
@@ -261,8 +260,15 @@  add_custom_target(gen-gl-tests
 			gen_extensions_defined.list
 			vp-tex.list
 			variable_index_write_tests.list
-			vs_in_fp64.list
 )
+# These generators create a huge number of tests, and take up many gigs of disk
+# space. They are not added to the gen-gl-tests target by default, only if the
+# the user requests them. Because CMake, this creates a new target and makes
+# that a dependency of the gen-gl-tests target.
+if(PIGLIT_BUILD_LARGE_GENERATORS)
+	add_custom_target(gen-large-gl-tests DEPENDS vs_in_fp64.list)
+	add_dependencies(gen-gl-tests gen-large-gl-tests)
+endif()
 
 # Create a custom target for generating OpenCL tests
 # This is not added to the default target, instead it is added