Link with -lrt for older glibc
Quoted from Linux Programmer's Manual (2017-09-15): #include <time.h> int clock_gettime(clockid_t clk_id, struct timespec *tp); Link with -lrt (only for glibc versions before 2.17). This patch adds additional checks for librt availability and append target_link_libraries accordingly. librt is absent on macOS. Fixed #139
This commit is contained in:
parent
7f29dec44a
commit
99e071cf2c
@ -108,6 +108,10 @@ if(WIN32)
|
||||
list(APPEND mi_libraries psapi shell32 user32)
|
||||
else()
|
||||
list(APPEND mi_libraries pthread)
|
||||
find_library(LIBRT rt)
|
||||
if(LIBRT)
|
||||
list(APPEND mi_libraries ${LIBRT})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user