Remove linking against RT (#7257)
authorGereon Kremer <nafur42@gmail.com>
Tue, 28 Sep 2021 23:20:24 +0000 (16:20 -0700)
committerGitHub <noreply@github.com>
Tue, 28 Sep 2021 23:20:24 +0000 (23:20 +0000)
This PR removes long obsolete cmake code that is only required when using a pre-2013 glibc.

cmake/ConfigureCvc5.cmake
src/CMakeLists.txt

index 009e9969bafeaae8593f3778ab15470fb747aaad..2b8e5cedc6d252c5d26473a39a1219166607534d 100644 (file)
@@ -68,11 +68,6 @@ if(CVC5_WINDOWS_BUILD)
   endif()
 else()
   check_symbol_exists(clock_gettime "time.h" HAVE_CLOCK_GETTIME)
-  if(NOT HAVE_CLOCK_GETTIME)
-    unset(HAVE_CLOCK_GETTIME CACHE)
-    check_library_exists(rt clock_gettime "time.h" HAVE_CLOCK_GETTIME)
-    find_library(RT_LIBRARIES NAMES rt)
-  endif()
 endif()
 check_symbol_exists(ffs "strings.h" HAVE_FFS)
 check_symbol_exists(optreset "getopt.h" HAVE_DECL_OPTRESET)
index 914bc5d0cef20a59787d7d1b35f1e14f6638aaf7..c7192dcf7592cc29badb457252af72696ef4b516 100644 (file)
@@ -1353,11 +1353,6 @@ target_link_libraries(cvc5 PRIVATE SymFPU)
 # depends on GMP.
 target_link_libraries(cvc5 PRIVATE GMP)
 
-# 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(cvc5 PRIVATE ${RT_LIBRARIES})
-
 #-----------------------------------------------------------------------------#
 # Visit main subdirectory after creating target cvc5. For target main, we have
 # to manually add library dependencies since we can't use