Fix build error on Mac OS X.

Linking C executable ../../../../../bin/cl-custom-use-sub-buffer-in-kernel
ld: library not found for -lrt

Fixes: e34b54672cbb ("cl: Fix build on systems where clock_gettime is only 
avaiable in librt")
Signed-off-by: Vinson Lee <[email protected]>
---
 tests/cl/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/cl/CMakeLists.txt b/tests/cl/CMakeLists.txt
index 9512fbd..6cdc1b8 100644
--- a/tests/cl/CMakeLists.txt
+++ b/tests/cl/CMakeLists.txt
@@ -8,7 +8,7 @@ link_libraries (
        ${OPENCL_opencl_LIBRARY}
 )
 
-if(PIGLIT_HAS_POSIX_CLOCK_MONOTONIC)
+if(HAVE_RT)
        link_libraries(rt)
 endif()
 
-- 
2.10.2

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

Reply via email to