summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authormakaimann <makaim@stanford.edu>2019-04-15 17:17:29 -0700
committerAndres Noetzli <andres.noetzli@gmail.com>2019-04-15 17:17:29 -0700
commit3df27eab5e9da3bab7853c02bdea6a250623d2a5 (patch)
tree0eb6e80e55ed8e67772b719a32ff7185fcf68aa1 /src/CMakeLists.txt
parent8db8b76f4ee98e3166ee8bb2e1bad77380060edc (diff)
Check for rt library in configuration -- support for glibc<2.17 (#2854)
This is a minor fix for systems with glibc version < 2.17. In that case, we need to link with `-lrt` according to the clock_gettime man page.
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 460c6c14d..372888d36 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -773,6 +773,11 @@ endif()
target_link_libraries(cvc4 ${GMP_LIBRARIES})
target_include_directories(cvc4 PUBLIC ${GMP_INCLUDE_DIR})
+# Add rt library
+# Note: For glibc < 2.17 we have to additionally link against rt (man clock_gettime).
+# RT_LIBRARIES should be empty for glibc >= 2.17
+target_link_libraries(cvc4 ${RT_LIBRARIES})
+
#-----------------------------------------------------------------------------#
# Visit main subdirectory after creating target cvc4. For target main, we have
# to manually add library dependencies since we can't use
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback