summaryrefslogtreecommitdiff
path: root/tests/cl/CMakeLists.txt
blob: b6d3b8d330c953de992bf529e893c3f1d349b260 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
include_directories(
	${OPENCL_INCLUDE_PATH}
	${piglit_SOURCE_DIR}/tests/util
)

link_libraries (
	piglitutil_${piglit_target_api}
	${OPENCL_opencl_LIBRARY}
)

if(PIGLIT_HAS_POSIX_CLOCK_MONOTONIC)
	link_libraries(rt)
endif()

function(piglit_cl_add_test)
	piglit_add_executable(${ARGV})
endfunction(piglit_cl_add_test)

function(piglit_cl_add_custom_test name)

	list(REMOVE_AT ARGV 0)
	piglit_cl_add_test(
		cl-custom-${name}
		${ARGV}
	)

endfunction(piglit_cl_add_custom_test)

function(piglit_cl_add_api_test name)

	list(REMOVE_AT ARGV 0)
	piglit_cl_add_test(
		cl-api-${name}
		${ARGV}
	)

endfunction(piglit_cl_add_api_test)

function(piglit_cl_add_program_test name)

	list(REMOVE_AT ARGV 0)
	piglit_cl_add_test(
		cl-program-${name}
		${ARGV}
	)

endfunction(piglit_cl_add_program_test)

add_subdirectory (custom)
add_subdirectory (api)
add_subdirectory (program)