Use different variable for second attempt at finding clock_gettime
This change allowed building on an ancient RH machine without breaking modern ones.
This commit is contained in:
parent
cef4a51810
commit
58e91c4304
1 changed files with 3 additions and 2 deletions
|
@ -78,8 +78,9 @@ elseif(UNIX)
|
||||||
check_library_exists(c clock_gettime "" HAVE_CLOCK_GETTIME)
|
check_library_exists(c clock_gettime "" HAVE_CLOCK_GETTIME)
|
||||||
if(NOT HAVE_CLOCK_GETTIME)
|
if(NOT HAVE_CLOCK_GETTIME)
|
||||||
# Before glibc 2.17, clock_gettime was in librt.
|
# Before glibc 2.17, clock_gettime was in librt.
|
||||||
check_library_exists(rt clock_gettime "time.h" HAVE_CLOCK_GETTIME)
|
check_library_exists(rt clock_gettime "time.h" HAVE_CLOCK_GETTIME_RT)
|
||||||
if(HAVE_CLOCK_GETTIME)
|
if(HAVE_CLOCK_GETTIME_RT)
|
||||||
|
set(HAVE_CLOCK_GETTIME "${HAVE_CLOCK_GETTIME_RT}")
|
||||||
target_link_libraries(OSAPI INTERFACE rt)
|
target_link_libraries(OSAPI INTERFACE rt)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue