aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
AgeCommit message (Collapse)Author
2013-02-06cmake: Allow to generate a tarball/zip with the binaries, scripts, data.José Fonseca
It doesn't make much sense to package piglit or install on machines, due to the frequency piglit tests are added/changed. However, binary packages are still useful for distributed testing where the binaries are built on one machine, and then passed to (sometimes other teams) for the actual testing. This patch allows one to conveniently generate such packages, simply by doing make package Then one can run piglit by unpacking the package elsewhere, set the PIGLIT_SOURCE_DIR and LD_LIBRARY_PATH accordingly, and run piglit scripts as usual. Reviewed-by: Brian Paul <brianp@vmware.com>
2012-12-31glean: Drop TIFF (and PNG and ZLIB) dependencies.José Fonseca
Not actually necessary. rgbTriStrip test used it but it was just a proof of concept, never part of any test list. This greatly simplifies building piglit for Windows. Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-12-11cmake: Request GLUT only when Waffle is not usedAdrian Marius Negreanu
Signed-off-by: Adrian Marius Negreanu <adrian.m.negreanu@intel.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-11-29cmake: Add option PIGLIT_BUILD_GLES3_TESTSChad Versace
Its default value is OFF. Signed-off-by: Chad Versace <chad.versace@linux.intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2012-11-29cmake: Require waffle>=1.2.2 if using waffleChad Versace
Working OpenGL ES3 support was introduced in waffle-1.2.2. Signed-off-by: Chad Versace <chad.versace@linux.intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2012-10-22cmake: Add a PIGLIT_BUILD_GL_TESTS optionAdrian Marius Negreanu
The GL tests were compiled unconditionally. This breaks on systems that dont't have a GL library. Signed-off-by: Adrian Marius Negreanu <adrian.m.negreanu@intel.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-10-19piglit framework: add gbm supportJordan Justen
Use gbm for testing if the PIGLIT_PLATFORM environment variable is set to gbm. Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-10-19waffle: require waffle >= 1.1Jordan Justen
This is to ensure gbm support is preset in waffle Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-10-09cmake: On Linux, require Waffle by defaultChad Versace
The new GL test framework, piglit_wfl_framework, requires Waffle. Testers should prefer to use that over piglit_glut_framework. To quiet the angry mob, if CMake fails to find Waffle then it prints a helpful message that points to Waffle's website. Reviewed-and-tested-by: Jordan Justen <jordan.l.justen@intel.com> Tested-by: Paul Berry <stereotype441@gmail.com> Acked-by: Eric Anholt <eric@anholt.net> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-10-09util: Add new GL test frameworksChad Versace
This patch adds three major types of GL test frameworks, listed below. They are described in detail in this patch's README.txt. piglit_glut_framework (uses GLUT) piglit_winsys_framework (uses Waffle) piglit_fbo_framework (uses Waffle) This patch only adds and builds the source for new frameworks; they are not yet used anywhere. Subsequent commits switch Piglit over to use the new frameworks and delete the sources for the old framework code. For details about the new frameworks, see this patch's README.txt. Reviewed-and-tested-by: Jordan Justen <jordan.l.justen@intel.com> Tested-by: Paul Berry <stereotype441@gmail.com> Acked-by: Eric Anholt <eric@anholt.net> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-10-09cmake: Define cmake flags and feature macros for X11, GLX, EGLChad Versace
On Linux, unconditionally set the following internal CMake flags to true: PIGLIT_HAS_X11 PIGLIT_HAS_GLX Also define feature macros with the same names. On all systems, if libEGL is found, then do the same for PIGLIT_HAS_EGL. The CMake flags will allow us to selectively add certain files to libpiglitutil_gl*. The flags and macros are used in a following commit. Reviewed-and-tested-by: Jordan Justen <jordan.l.justen@intel.com> Tested-by: Paul Berry <stereotype441@gmail.com> Acked-by: Eric Anholt <eric@anholt.net> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-10-09cmake: Prefix cmake options and feature macros with PIGLITChad Versace
Some cmake options and features macros had form USE_${feature}, others BUILD_${category}_TESTS. This patch consistently prefixes all such options and macros with PIGLIT. Piglit, be a good code citizen. Namespace your variables. This patch was created with find . -type f | xargs sed -i \ -e 's/\(^\|[^_]\)\(USE_\(GLX\|GLUT\|WAFFLE\|OPENGL\|OPENGL_ES1\|OPENGL_ES2\)\)\($\|[^_]\)/\1PIGLIT_\2\4/g' \ -e 's/\(^\|[^_]\)\(BUILD_\(CL\|GLX\|GLES1\|GLES2\)_TESTS\)\($\|[^_]\)/\1PIGLIT_\2\4/g' \ Reviewed-and-tested-by: Jordan Justen <jordan.l.justen@intel.com> Acked-by: Kenneth Graunke <kenneth@whitecape.org> Tested-by: Paul Berry <stereotype441@gmail.com> Acked-by: Eric Anholt <eric@anholt.net> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-09-20cmake: Use C++ compiler to link C programs if using Solaris Studio.Vinson Lee
Fixes Solaris Studio build. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50802 Signed-off-by: Vinson Lee <vlee@freedesktop.org>
2012-09-19Merge remote-tracking branch 'blaz/opencl-request-v2'Eric Anholt
This introduces OpenCL testing to piglit under tests/all_cl.tests.
2012-09-05cmake: Build OpenCL utilities and frameworkBlaž Tomažič
Add BUILD_CL_TESTS option to cmake configuration and build OpenCL utilities and framework to library piglitutil_cl. Signed-off-by: Blaž Tomažič <blaz.tomazic@gmail.com>
2012-09-04glut_waffle: Add input support for X11 [v2]Chad Versace
Add support for input when using glut_waffle's GLX and X11/EGL backends. Tested with fbo-clean-formats; I cycled through the tests with the keyboard and then quit with the escape key. v2: - Rewrite x11_event_loop() without continue, per brianp. - Remove spurious waffle_window_swap_buffers from x11_event_loop. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-09-04cmake: If using Waffle, require version 1.0.1Chad Versace
A following patch adds support for X11 input to glut_waffle. waffle-1.0.1 contains required bugfixes for that patch to work. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-08-23cmake,waffle: Bump requirement to waffle>=1.0Chad Versace
If piglit is configured to use waffle, then use pkgconfig to require waffle>=1.0. Also, replace the custom cmake WAFFLE variables with those provided by the pkg_check_modules. Waffle 1.0 moved its header directory from $prefix/include/waffle to $prefix/include/waffle-1. So add '-I $prefix/include/waffle-1' to the CFLAGS and update the #include directives appropriately. Signed-off-by: Chad Versace <chad@chad.versace.us>
2012-08-09Shut up gcc about c++11 issues.Eric Anholt
This isn't c++11 code.
2012-06-20cmake: For MSVC, add "include/msvc/c99" to include path (v3)Chad Versace
v2: Place directive in `if (MSVC)` block`, per Jose. v3: Really do what I said in v2. Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-06-14cmake: Give an early error message when the required make.template module is ↵José Fonseca
not available. Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-05-23cmake: Emit fatal error if BUILD_GLES{1,2}_TESTS is enabled without USE_WAFFLEChad Versace
glut_waffle is now required to build the GLES tests. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-05-23cmake: Add option USE_WAFFLEChad Versace
If enabled, Piglit will use Waffle in place of GLUT. The option is disabled by default. As of this patch, however, enabling this option does nothing but require libwaffle. Future patches will integrate Waffl into Piglit. Reviewed-by: Pauli Nieminen <pauli.nieminen@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-05-23cmake: Add module FindWaffleChad Versace
This enables Piglit to call `find_package(Waffle REQUIRED)`. Reviewed-by: Pauli Nieminen <pauli.nieminen@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Signed-off-by: Chad Versace <chad@chad.versace.us>
2012-05-23cmake: Add options BUILD_GLES{1,2} tests [v2]Chad Versace
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. v2: Fix typo GLES1 -> GLES2. Reviewed-by: Pauli Nieminen <pauli.nieminen@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-04-29cmake: add an option for building GLX testsDylan Noblesmith
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-04-25cmake: Define WIN32_LEAN_AND_MEAN for the whole project.José Fonseca
This avoids namespace pollution when including windows.h, and we don't really need use or need the whole lot of headers that get included by windows.h. In particular, this fixes failure to build ext_framebuffer_multisample accuracy test on windows because some obscure Windows headers define "small" as "char".
2012-03-23cmake: Move utility functions into piglit_util.cmakeChad Versace
Currently there is only one utility function, piglit_include_target_api. However, subsequent commits will add several more. I'm choosing to define all the utility functions in their own file, piglit_util.cmake, in order to keep things organized and the top CMakeLists uncluttered. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-03-23piglit-dispatch: Code generation scripts.Paul Berry
This patch contains the code generation scripts that convert the files gl.spec, gl.tm, and enumext.spec into C code, as well as the CMake directives to run the scripts. Code generation occurs in two phases: first the script glapi/parse_glspec.py converts the .spec and .tm files into an intermediate JSON format, which is stored in glapi/glapi.json. Then, the script tests/util/gen_dispatch.py converts the JSON file into two files, tests/util/generated_dispatch.c and tests/util/generated_dispatch.h. There are two motivations for breaking code generation into two phases: (1) there are other code generation tasks we may add in the future (e.g. generating the tests/util/piglit-util-enum.c file), and it would be nice not to have to rewrite any parsing code when we do so. (2) if the GL consortium ever decides to change the format of gl.spec, gl.tm, and enumext.spec, then we only have to change parse_glspec.py. These code generation scripts can be run by invoking "make piglit_dispatch_gen" from the toplevel source directory. v2: Add clarifying comments, remove a bogus "print" statement, and raise an exception if an unrecognized multiplicity is encountered. Also, handle "reference" multiplicity. v3: Add APIENTRY to stub functions. Rename "near" and "far" to avoid problems on MSVC. Get rid of "__" in function names. Rename initialize_dispatch_pointers => reset_dispatch_pointers. Add gl_10x_version parameter to get_core_proc(). Output generated code relative to CMAKE_BINARY_DIR so that it won't pollute source directories when building out of tree. Add .gitignore so that generated files are ignored when building in tree. Add GL_VERSION_* defines.
2012-03-09cmake: Avoid depending on MinGW runtime DLLs.José Fonseca
It makes the binaries easier to deploy. Tested-by: Brian Paul <brianp@vmware.com>
2012-03-03cmake: check for glproto headersDylan Noblesmith
And error out when they're not found, rather than failing to compile later when GL/glxproto.h can't be found.
2012-03-03cmake: workaround cmake bug when GLUT is not foundDylan Noblesmith
Silences thousands of lines of spam. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42700
2012-03-03don't write generated header to the source directoryDylan Noblesmith
It was impossible to have the source directory read-only. Also add the include_directories() directive for tests/util in just one place, under tests/, so that all subdirectories inherit it. A bunch of CMakeLists.txt files duplicate it, so delete those redundant include flags: sed -i -e "/^\t\${piglit_SOURCE_DIR}\/tests\/util/ d" \ `grep piglit_SOURCE_DIR -rl tests/ | grep "CMakeLists\.gl"`
2012-01-20cmake: Warn when placing declarations after statements.José Fonseca
Unfortunately this will enable the warning even on OS specific directories will never be built with MSVC, but it looks like the use of this C99 is actually very scarce, even on those OS specific directories. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-12-02CMake: compile with debug info on by defaultnobled
This makes debugging crashes feasible out of the box. Acked-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2011-11-30cmake: Silence several pointless MSVC warnings.José Fonseca
2011-10-03Define _USE_MATH_DEFINES globally on MSVC.José Fonseca
2011-09-09cmake: add gles1 as a valid target APIChia-I Wu
This commit adds the infrastructure for writing GLES1 specific tests. Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
2011-08-25cmake: Don't define min/max macros on Windows.José Fonseca
2011-08-19Add piglit_set_rlimit utility functionIan Romanick
This function sets the maximum amount of memory that a process can have in its address space. This is useful for tests that use "infinite" memory on failing implementations. Setting this low can prevent the test from exhausting system memory and adversely affecting other tests. Acked-by: José Fonseca <jfonseca@vmware.com>
2011-08-09Fix test generation on Arch Linux.Paul Berry
On Arch Linux, "python" means Python 3.x, and Python 2.x is called "python2". The test generation code requires Python 2.x. In many other distributions, "python" refers to Python 2.x. This patch adds logic to the toplevel CMakeLists that checks both "python2" and "python" to see which one is Python 2.x, and once it is found, sets the cmake variable ${python} to point to it. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-08-05cmake: Fix build with CMake 2.6.Vinson Lee
2011-08-05Add comprehensive tests of builtin functions with uniform input.Paul Berry
This patch adds 462 tests to piglit, which comprehensively test the behavior of GLSL built-in functions on vertex and fragment shaders. The test vectors are auto-generated in Python, by using the numpy library to simulate the behavior of the built-in functions on a variety of inputs (in builtin_function.py), and then producing shader_runner tests to verify the expected behavior (in gen_builtin_uniform_tests.py). Test generation happens as part of the piglit build process. To run the test generation step by itself, use "make gen-tests" from the root of the piglit tree (after configuring using cmake). The generated tests may be found in generated_tests/spec. The auto-generation code depends on Python 2.6 and on the numpy library (www.numpy.org). I've updated the README to reflect these dependencies, and added code to CMakeLists.txt to check for them at configure time. (Note: other parts of Piglit already depend on Python 2.6, but the dependency wasn't previously explicit).
2011-06-22Also use -Wall (or equivalent) when compiling the C++ sources.José Fonseca
Although the bulk is C, there are a few C++ sources as well.
2011-06-22Don't use -Wall on MSVC.José Fonseca
It causes thousands of warnings on windows.h...
2011-05-13Make TIFF an optional dependency.José Fonseca
It's only used by glean, so no need to force linking against it everywhere.
2011-04-06cmake: Remove duplicate find_library() call.José Fonseca
2011-03-13Portability build fixes for MinGW.José Fonseca
2011-03-07cmake: Put the binaries in the right place for MSVS too.José Fonseca
Until now MSVS was putting binaries on a Debug/Release/etc sub-directory. This implied using CMAKE_RUNTIME_OUTPUT_DIRECTORY and CMAKE_LIBRARY_OUTPUT_DIRECTORY instead of deprecated EXECUTABLE_OUTPUT_PATH and LIBRARY_OUTPUT_PATH vars.
2011-03-07cmake: Allow GL/glext.h to be specified separately.José Fonseca
glext.h is not bundled on MSVC, so its path needs to be included separately. It might be also useful on other platforms to override the system's glext.h with a more recent one.