[Piglit] [PATCH 1/8] tests/util: Link with rt if PIGLIT_HAS_POSIX_CLOCK_MONOTONIC

Brian Paul brianp at vmware.com
Mon Jan 6 10:19:25 PST 2014


On 01/06/2014 09:02 AM, Daniel Kurtz wrote:
> If PIGLIT_HAS_POSIX_CLOCK_MONOTONIC, piglit-util.c will use clock_gettime,
> so, make sure to link against -lrt, too.
>
> Signed-off-by: Daniel Kurtz <djkurtz at chromium.org>
> ---
>   tests/util/CMakeLists.txt | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/tests/util/CMakeLists.txt b/tests/util/CMakeLists.txt
> index 83391df..df2ea70 100644
> --- a/tests/util/CMakeLists.txt
> +++ b/tests/util/CMakeLists.txt
> @@ -1,5 +1,9 @@
>   add_definitions(-DSOURCE_DIR="${piglit_SOURCE_DIR}/")
>
> +if(PIGLIT_HAS_POSIX_CLOCK_MONOTONIC)
> +    link_libraries(rt)
> +endif()
> +
>   set(UTIL_INCLUDES
>   	${CMAKE_CURRENT_BINARY_DIR}
>   	${CMAKE_CURRENT_SOURCE_DIR}
>

Thanks.  This fixes a problem I saw on one of my systems.  I'll push 
this patch soon.

Tested-by: Brian Paul <brianp at vmware.com>



More information about the Piglit mailing list