summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
AgeCommit message (Collapse)AuthorFilesLines
2015-03-24cmake: Silence CMP0042 warnings on MacOSX.Jose Fonseca1-0/+5
Reviewed-by: Brian Paul <brianp@vmware.com>
2015-03-04CMakeList.txt: Install OpenCL inc files.Dylan Baker1-1/+8
These are needed to pass tests, but they weren't being installed for running out of tree. Fixes ~100 warns when running out of tree with beignet. Trivial. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2015-03-03cmake: Use -Werror=pointer-arith on GCC builds.Jose Fonseca1-0/+6
Void pointer arithmetic is not supported on MSVC, so passing -Werror=pointer-arith will make it easier for everybody to catch this sort of portability issues as the code is written. Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
2015-02-26cmake: Require mako >= 0.8.0.Vinson Lee1-1/+1
future_imports was added in Mako 0.8.0. http://docs.makotemplates.org/en/latest/changelog.html#change-0.8.0 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89347 Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
2015-02-26cmake: Require Python six >= 1.4.0.Vinson Lee1-1/+1
six.PY2 was added in 1.4.0. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2015-02-23Add dependency on Python sixDylan Baker1-0/+1
Six is a module that provides a clean, standardized interface for handling python2 and python3 from the same code base. This adds a requirement on six as a build-time dependency, the plan is to use it only for python generators (those called during build time) While it certainly is possible to reimplement much of what six does scratch and not add another python dependency, I think it's better to just use six. For one thing a large number of python modules already depend on six, so the chances are good that most people already have it installed. Second, it's the de facto standard for supporting complex code bases in 2 and 3, so it's familiar and many of the corner cases have already been addressed. This adds the necessary cmake boilerplate to ensure that six is available. At this time I don't know of a specific version being required, but I am currently using 1.9.0 v2: - update README with six dependency (Jordan) Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2015-02-20cmake: change VLA warning into errorJan Vesely1-3/+3
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2015-02-20cmake: Enforce standard C99 syntax for variadic macros.Jose Fonseca1-0/+11
Although the non-standard GCC syntax has some nice properties, for most practical cases the standard C99 syntax is perfectly fine. Particuarly for printf-like macros, which pretty much account for most the uses of variadic macros in piglit. Unfortunately this will only be effective on newer GCC versions, due a bug in GCC. See comment for more details. Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2015-02-18cmake: Drop -Wdeclaration-after-statement.Jose Fonseca1-7/+1
MSVC 2013 does support C99 declarations after statements. There were some bugs before 2013 Update 4 but it there are no known issues with Update 4 so far. And that's what we already require. Trivial.
2015-02-04cmake: Fix if-command logic on non MSVC.Jose Fonseca1-2/+4
Trivial.
2015-02-04cmake: Require MSVC 2013 Update 4.Jose Fonseca1-3/+3
It has importants fixes to C parser. Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2015-02-02add missing whitespace if waffle was not found by cmake (trivial)Felix Schwarz1-1/+1
Reviewed-by: Dylan Baker <dylanx.c.baker@intel.com>
2015-01-19cmake: Fix ee8579b452f0 regressionDylan Baker1-3/+3
Apparently find_package() and pkg_check_modules() return different variables, while piglit still builds on my system without this patch if fails on many other systems. This problem was doubly masked by the fact that in the original series there is an additional patch to use waffle's cmake config file instead of pkg_config. That patch is waiting for the next cmake release. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Tested-by: Mark Janes <mark.a.janes@intel.com>
2015-01-19cmake: Require numpy >= 1.6.2Dylan Baker1-1/+1
The test generator for arb_shader_precision cannot be generated by numpy < 1.6.2, probably due to numpy upstream bug #1675, which was fixed in 1.6.2. bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88595 Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Vinson Lee <vlee@freedesktop.org>
2015-01-19cmake: Simplify finding python modulesDylan Baker1-12/+3
This patch adds 3 files, PythonModule.cmake, FindPythonMako.cmake and FindPythonNumpy.cmake. PythonModule provides a simple function for running python and parsing the version strings, each FindPython*.cmake then just calls that function, and then calls the find_package_handle_standard_args macro for simple, standard finding. This is much more in line with how the core cmake modules work, and makes is trivial to add additional python modules with all of the standard cmake awesomeness like version checking. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2015-01-19cmake: use cmake builtin python moduleDylan Baker1-19/+3
This removes a bunch of code that we rolled for finding python interpreters, and uses the cmake builtins. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2015-01-19cmake: use more standard cmake namesDylan Baker1-12/+12
This replaces WAFFLE_* with Waffle_*. It also replaces WAFFLE_LDFLAGS with WAFFLE_LIBRARIES, which again is more cmake standard. This will be used in follow on patches to use the cmake config module for waffle. v2: - fix whitespace errors Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2015-01-07CMakeList.txt: Fix error message for missing pythonDylan Baker1-2/+2
We require python 2.7, but our error message still says that we require 2.6. Trivial. Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
2014-12-16cmake: Improve experience detecting waffle on Windows.José Fonseca1-0/+11
- Use find_path/find_library so one can see the variables on cmake-gui - Provide better error message. Reviewed-by: Brian Paul <brianp@vmware.com>
2014-12-16cmake: Don't check WAFFLE_VERSION on Windows.José Fonseca1-14/+14
The version number must be manually on command line, hence this version check is just an hindrance for Windows. Reviewed-by: Brian Paul <brianp@vmware.com>
2014-12-16cmake: Don't rely on pkg-config for all Windows builds.José Fonseca1-1/+1
Instead of just MSVC builds. Because pkg-config is not commonly available when compiling natively on Windows, and gives the wrong results (the host package instead of target package) when cross-compiling to Windows. Reviewed-by: Brian Paul <brianp@vmware.com>
2014-12-14utils: add initial WAFFLE_WGL supportEmil Velikov1-1/+6
This will allow us to use waffle with its upcoming WGL support for Windows. With that done, the final step to removing glut is to convert piglit to use waffle for MacOS. Current implementation does not have input handling/event loop, and as such one needs to pass "-auto" when running individual tests, otherwise the test will abort after being displayed for 8 seconds. Waffle 1.5.0 is the first version that has WGL support. TODO: - Add input handling (event_loop). v2: Updated the instructions in the README. v3: Update against upstream Waffle (no API breakage) v4: s/Sleep/fprintf()+getchar()/ in the event_loop. Suggested by Jose. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com> (v1)
2014-11-08cmake: Fix GCC -Wvla flag check.Vinson Lee1-2/+2
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86045 Signed-off-by: Vinson Lee <vlee@freedesktop.org>
2014-11-08cmake: Warn when variable length arrays are used.José Fonseca1-1/+5
As these are not supported on MSVC, not even MSVC 2013 since it only has library support for C99, it doesn't actually support C99 syntax. Suggested by Jan Vesely. Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-11-08cmake: Require Visual Studio 2013.José Fonseca1-8/+5
Verified that cmake aborts with MSVS 2012. https://bugs.freedesktop.org/show_bug.cgi?id=85528 Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-11-03gbm: use libcaca to display results in non-auto modeJordan Justen1-0/+8
If GBM is enabled, attempt to locate libcaca too. If the test was not run with -auto, then use libcaca to draw a text version of the test's results to the console. v2 (Ben): Rebase Per Ken's comment the libcaca API may change at v1.0, but it's still not there are 8 months. I propose we push this, and worry about libcaca breakage later. Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> (v1) Acked-by: Kenneth Graunke <kenneth@whitecape.org> Cc: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-10-10Add piglit_set_timeout for tests that might hang.Jamey Sharp1-3/+28
Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Eric Anholt <eric@anholt.net>
2014-08-19Bump python version requirement to 2.7.xDylan Baker1-1/+1
Python 2.6.6 was the final feature release of the 2.6 branch, it was released in August 2010. Python 2.6.9 was the last security release, it was released in October 2013. There is no support from upstream for 2.6, either for bugs or security problems, OSX, linux, windows all have 2.7 available to them, as does VMWare in their environment. Since no one any longer has a hard 2.6 requirement going to 2.7 seems like a natural choice. It has more features, more modules, and better 3.x compatibility than 2.6 does. Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
2014-08-18cmake: Fix syntax.José Fonseca1-1/+1
`}` -> `endif ()` Trivial.
2014-08-18cmake: cleanup PIGLIT_USE_WAFFLE buildsEmil Velikov1-9/+9
- Mandating pkg-check when building with MSVC is silly. - Do not mess around with CMAKE_C*_FLAGS directly but use include_directories to handle waffle's headers location. - Use WAFFLE_LIBRARIES over WAFFLE_LDFLAGS for linking purposes. v2: Remove all WAFFLE_LDFLAGS instances. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com> (v1)
2014-08-18cmake: don't use open_s with mingwEmil Velikov1-0/+2
The function is part of the secapi, which is not available under WinXP. Building piglit with it will result in broken tests. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2014-06-27cmake: Don't link to the OpenGL ES 2.0 libraryChad Versace1-2/+0
Piglit has not needed to link to libGLESv2 ever since Anholt added GLES2 support to piglit-dispatch. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2014-06-26cmake: Require Mako >= 0.7Chad Versace1-10/+3
Piglit began requiring Mako 0.7 as of commit ac1f382 "dispatch: Generate piglit-dispatch from Khronos XML". Piglit has required Mako for a long time, and CMake did check for Mako. But CMake didn't check the version. This patch fixes CMake to require Mako >= 0.7 and to provide the below hint on failure: Hint: Try installing Mako with `pip install --user --upgrade Mako` Reported-by: Tom Stellard <thomas.stellard@amd.com> Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2014-06-23cmake: Don't link to libGLESv1Chad Versace1-1/+0
Now that the GLES1 tests use piglit-dispatch, they no longer need to link to the GLES1 library. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2014-06-23glapi: Remove the glapi directoryChad Versace1-1/+0
Piglit no longer uses the directory because it now generates piglit-dispatch from the Khronos XML. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2014-06-04cmake: Install piglit as piglit.py on Windows.José Fonseca1-1/+6
Windows doesn't support #!. Instead it determines how to execute scripts based on their file extensions. Reviewed-by: Brian Paul <brianp@vmware.com>
2014-06-03glslparsertest: Support tessellation shaders.Fabian Bieler1-2/+2
V2: Add .tesc and .tese files to installation parameters of generated_tests and tests. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2014-05-27README,cmake: Update Waffle's website urlChad Versace1-1/+1
Waffle now lives at http://www.waffle-gl.org. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2014-05-08framework: bump cmake minimum requirement to 2.8.5Dylan Baker1-1/+1
Commit dd1d13182bf61f1036c29ef7b4c244d3dae297a1 adds a requirement for a feature added to cmake 2.8.5. This version of cmake was released in July of 2011. The only supported distribution not shipping cmake >= 2.8.5 is EL6, however, the EPEL repository for EL provides a compatible version of cmake. bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78368 Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com> Reviewed-by: Vinson Lee <vlee@freedesktop.org>
2014-05-06piglit: Add a toplevel piglit commandDylan Baker1-12/+5
This uses the functions created by the last commit to create a all-in-one piglit command. It uses argparse to parse partial commands and provide help for those functions. It is also capable of handling all of the black magic for setting the python sys.path and setting the PIGLIT_SOURCE_DIR environment variable. v2: - Allow the name of the program to not be piglit (example: piglit-20140101) - Remove unused check from cmake - Install piglit as piglit${PIGLIT_INSTALL_VERSION}; when this variable is unset piglit will be installed simply as 'piglit' v3: - split "../lib" into "..", "lib" in os.path.join() Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2014-05-02cmake: Add version suffix for install pathsJordan Justen1-2/+8
If used, then piglit will be installed into a separate path. For example, if '-DPIGLIT_INSTALL_VERSION=20140430' was specified with cmake, then piglit would install to $PREFIX/lib/piglit-20140430. Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
2014-05-02cmake: Install under separate piglit directoryJordan Justen1-6/+17
Install paths updated: * $PREFIX/share/doc => $PREFIX/share/doc/piglit * $PREFIX/lib => $PREFIX/lib/piglit/lib * $PREFIX/bin => $PREFIX/lib/piglit/bin * etc... Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
2014-04-30cmake: Tone down the MSVC warning level.José Fonseca1-5/+6
Very few people are building piglit with MSVC, and the current avalanche of insignificant warnings ends up being a disservice for those who do, as it only ends up hiding potential problems. Reviewed-by: Brian Paul <brianp@vmware.com>
2014-04-30cmake: Fix stdbool.h for MSVC 2013.José Fonseca1-1/+7
Reviewed-by: Brian Paul <brianp@vmware.com>
2014-04-30cmake: Fix -Wdeclaration-after-statement detection.José Fonseca1-1/+1
Copy'n'paste typo. Trivial. Reviewed-by: Brian Paul <brianp@vmware.com>
2014-04-17cmake: Check for pthreadsChad Versace1-0/+6
Set PIGLIT_HAS_PTHREADS as a CMake variable and a cpp feature macro if the systems has pthreads. Future EGL_KHR_fence_sync tests will be multi-threaded. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2014-01-28cmake: Fix Wayland detectionChad Versace1-1/+2
CMake probed pkgconfig correctly for Wayland, but incorrectly checked pkgconfig's result. pkg_check_modules() sets WAYLAND_FOUND, so we must check for that variable. Also, set PIGLIT_HAS_WAYLAND if pkgconfig finds Wayland. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2014-01-25Define ffs for MinGW.Vinson Lee1-0/+1
Fixes several MinGW ffs implicit-function-declaration warnings. cubemap.c: In function 'piglit_display': cubemap.c:271:4: warning: implicit declaration of function 'ffs' [-Wimplicit-function-declaration] y_offset += row_dim * 2 + (ffs(dim) + 3) * PAD; ^ Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2014-01-23cmake: Install vpfpgeneric testsDylan Baker1-1/+1
Currently piglit does not install vpfpgeneric test files (*.vpfp) files, meaning that out of tree builds do not have these tests. This patch addresses that issue. Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
2014-01-23CMakeLists: remove redundant waffle version checkDaniel Kurtz1-14/+0
This block was accidentally left in place when patch [0] was applied. [0] fc007bc7c6729c2d4ad61fe8360c43c973404ce5 cmake: indent spaces -> tabs Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>