[Piglit] [PATCH] tests/util: Link with rt if PIGLIT_HAS_POSIX_CLOCK_MONOTONIC
Daniel Kurtz
djkurtz at chromium.org
Mon Dec 30 09:31:10 PST 2013
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}
--
1.8.5.1
More information about the Piglit
mailing list