summaryrefslogtreecommitdiff
path: root/cmake
AgeCommit message (Collapse)AuthorFilesLines
2012-08-23cmake: Remove unused moudule FindWaffleChad Versace1-43/+0
Now that Piglit uses pkgconfig to find Waffle, this module is no longer used. Signed-off-by: Chad Versace <chad@chad.versace.us>
2012-06-04make: Make util libraries shared in non-windows systemsPauli Nieminen1-1/+5
Incremental builds take long time linking tests if utilities are modified. The link time can be eliminate if libraries are made shared. Shared libraries need to specify symbols that are excepted to be declared in executeable as weak to allow linking without symbols that aren't used in runtime. Windows has limitation that shared library can't have programs main function that forces windows to use static libraries. Signed-off-by: Pauli Nieminen <pauli.nieminen@linux.intel.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com> Acked-by: Kenneth Graunke <kenneth@whitecape.org>
2012-05-23cmake: Use glut_waffle if USE_WAFFLE is enabledChad Versace4-15/+20
For GL tests (those built by CMakeLists.gl.txt), if USE_WAFFLE is enabled then freeglut is replaced with glut_waffle. For GLES1 and GLES2 tests, glut_waffle is now 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.versace@linux.intel.com>
2012-05-23cmake: Add module FindWaffleChad Versace1-0/+43
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: Relocate all GLUT directives into single locationChad Versace1-0/+6
Nearly all CMakeLists.gl.txt contained the following: include_directories(${GLUT_INCLUDE_DIR}) link_libraries(${GLUT_glut_LIBRARY}) This patch relocates them to cmake/target_api/gl/CMakeLists.txt. 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: Clean up gles{1,2}/CMakeLists.txtChad Versace2-18/+14
Now that there are options to control building the GLES1 and GLES2 tests, there is no need for the 'if' guard in these CMakeLists. Remove the unneeded 'if' guards, and hence a level of indentation. 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 options BUILD_GLES{1,2} tests [v2]Chad Versace1-2/+9
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-03-23cmake: Make each *.o depend on generated piglit_dispatch headersChad Versace1-6/+12
Alter the wrapper functions `piglit_add_executable` and `piglit_add_library` to add to each object file a dependency on piglit_dispatch's generated files. This requires that a top-level custom target be created, `piglit_dispatch_gen`, to track that dependency. The result is that updating any files in `piglit_dispatch_gen_inputs` (for example, gl_API.xml) triggers a recompile of all objects. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-03-23cmake: Define wrapper functions piglit_add_{executable,library}Chad Versace1-0/+26
For now, `piglit_add_executable` is a trivial wrapper around `add_executable`. Ditto for `piglit_add_library`. A subsequent commit will leverage the wrappers to add to each object file an explicit dependency on the header files generated by piglit_dispatch. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-03-23cmake: Move utility functions into piglit_util.cmakeChad Versace2-23/+49
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 Berry2-0/+86
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.
2011-09-09cmake: add gles1 as a valid target APIChia-I Wu2-1/+13
This commit adds the infrastructure for writing GLES1 specific tests. Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
2011-02-26cmake: Do not add GLES2 targets if OPENGL_gles2_LIBRARY is not foundChad Versace1-7/+10
Signed-off-by: Chad Versace <chad.versace@intel.com>
2011-02-25glut_egl: Build library glut_eglChad Versace1-4/+6
2011-02-25cmake: Enable building GLES2 targetsChad Versace2-4/+10
Signed-off-by: Chad Versace <chad.versace@intel.com>
2011-02-25cmake: Add function piglit_include_target_apiChad Versace1-0/+47
piglit_include_target_api() facilitates building Piglit with multiple GL targets (for example, GL and GLES2). Note: This belongs to a series that add GLES2 support to Piglit. Signed-off-by: Chad Versace <chad.versace@intel.com>
2011-02-25cmake: Prepare CMake for GL and GLES2 buildsChad Versace4-0/+21
Add two new CMakeLists, /cmake/target_api/{gl,gles2}/CMakeLists.txt, each of which builds Piglit with its respective API. (Of course, gles2/CMakeLists.txt adds no targets because Piglit does not yet support building with GLES2.) The toplevel CMakeLists no longer adds subdirectory /tests; that is now the responsiblity of the API-specific CMakeLists. Note: This belongs to a series that adds GLES2 support to Piglit. Signed-off-by: Chad Versace <chad.versace@intel.com>