[Piglit] [PATCH] cl: Use HAVE_RT to determine linking with rt.
Serge Martin
edb+piglit at sigluy.net
Sun Nov 6 13:57:20 UTC 2016
On Friday 04 November 2016 22:57:25 Vinson Lee wrote:
> 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)
Looks like it's HAVE_LIBRT.
And I think the test should be if(PIGLIT_HAS_POSIX_CLOCK_MONOTONIC AND
HAVE_LIBRT) like in tests/util/CMakeLists.txt
With that changed
Reviewed-by: Serge Martin <edb+piglit at sigluy.net>
> link_libraries(rt)
> endif()
More information about the Piglit
mailing list