From: Tom Stellard <[email protected]>

clock_gettime is available in glibc 2.17 and newer, but anyone using
an older version of glibc must link against librt.
---
 tests/cl/CMakeLists.txt | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/cl/CMakeLists.txt b/tests/cl/CMakeLists.txt
index b91eda5..53409ad 100644
--- a/tests/cl/CMakeLists.txt
+++ b/tests/cl/CMakeLists.txt
@@ -8,6 +8,10 @@ link_libraries (
        ${OPENCL_opencl_LIBRARY}
 )
 
+if(PIGLIT_HAS_POSIX_CLOCK_MONOTONIC)
+    link_libraries(rt)
+endif()
+
 function(piglit_cl_add_test)
     add_executable(${ARGV})
 endfunction(piglit_cl_add_test)
-- 
1.8.1.4

_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to