aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorBlaž Tomažič <blaz.tomazic@gmail.com>2012-08-29 22:18:22 +0200
committerBlaž Tomažič <blaz.tomazic@gmail.com>2012-09-05 14:56:00 +0200
commit9ffd30f4180e827b0a20641ebcfba50f595c57ef (patch)
treeb2d1e3ec14516430b2adf1b126d9db39ec7f507c /CMakeLists.txt
parent5ce701941127e8e05ec67ca87c429e74c1744db6 (diff)
downloadpiglit-9ffd30f4180e827b0a20641ebcfba50f595c57ef.tar.gz
cmake: Build OpenCL utilities and framework
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>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 893a14d5..b840d5ab 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,6 +19,7 @@ find_package(X11)
option(BUILD_GLES1_TESTS "Build tests for OpenGL ES1" OFF)
option(BUILD_GLES2_TESTS "Build tests for OpenGL ES2" OFF)
+option(BUILD_CL_TESTS "Build tests for OpenCL" OFF)
option(USE_WAFFLE "Use Waffle in place of GLUT" OFF)
if(USE_WAFFLE)
@@ -36,6 +37,10 @@ if(BUILD_GLES2_TESTS AND NOT USE_WAFFLE)
message(FATAL_ERROR "Option BUILD_GLES2_TESTS requires USE_WAFFLE")
endif(BUILD_GLES2_TESTS AND NOT USE_WAFFLE)
+if(BUILD_CL_TESTS)
+ find_package(OpenCL REQUIRED)
+endif(BUILD_CL_TESTS)
+
IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
option(BUILD_GLX_TESTS "Build tests that require GLX" ON)
ELSE()