[Piglit] [PATCH] cl: Use HAVE_RT to determine linking with rt.
Vinson Lee
vlee at freedesktop.org
Fri Nov 4 22:57:25 UTC 2016
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 <vlee at freedesktop.org>
---
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
More information about the Piglit
mailing list