Commit 68d1ea5e authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

refs #5120 fix up linking on linux

git-svn-id: file:///svn/toku/tokudb@50926 c7de825b-a66e-492c-adef-691d508d4ae1
parent d7801469
...@@ -88,6 +88,12 @@ if (NOT HAVE_BACKTRACE_WITHOUT_EXECINFO) ...@@ -88,6 +88,12 @@ if (NOT HAVE_BACKTRACE_WITHOUT_EXECINFO)
endif () endif ()
endif () endif ()
if(HAVE_CLOCK_REALTIME)
list(APPEND EXTRA_SYSTEM_LIBS rt)
else()
list(APPEND EXTRA_SYSTEM_LIBS System)
endif()
set(CMAKE_REQUIRED_LIBRARIES pthread) set(CMAKE_REQUIRED_LIBRARIES pthread)
## check whether we can change rwlock preference ## check whether we can change rwlock preference
check_function_exists(pthread_rwlockattr_setkind_np HAVE_PTHREAD_RWLOCKATTR_SETKIND_NP) check_function_exists(pthread_rwlockattr_setkind_np HAVE_PTHREAD_RWLOCKATTR_SETKIND_NP)
......
...@@ -29,11 +29,6 @@ if(BUILD_TESTING) ...@@ -29,11 +29,6 @@ if(BUILD_TESTING)
add_executable(${test} ${test}) add_executable(${test} ${test})
target_link_libraries(${test} ${LIBTOKUPORTABILITY}) target_link_libraries(${test} ${LIBTOKUPORTABILITY})
set_target_properties(${test} PROPERTIES POSITION_INDEPENDENT_CODE ON) set_target_properties(${test} PROPERTIES POSITION_INDEPENDENT_CODE ON)
if(HAVE_CLOCK_REALTIME)
target_link_libraries(${test} rt)
else()
target_link_libraries(${test} System)
endif()
endforeach(test) endforeach(test)
list(REMOVE_ITEM tests test-pwrite4g) list(REMOVE_ITEM tests test-pwrite4g)
......
...@@ -24,8 +24,7 @@ typedef int clockid_t; ...@@ -24,8 +24,7 @@ typedef int clockid_t;
// without a real clock_gettime() // without a real clock_gettime()
#define CLOCK_REALTIME 0x01867234 #define CLOCK_REALTIME 0x01867234
#endif #endif
int int toku_clock_gettime(clockid_t clk_id, struct timespec *ts) __attribute__((__visibility__("default")));
toku_clock_gettime(clockid_t clk_id, struct timespec *ts);
// *************** Performance timers ************************ // *************** Performance timers ************************
// What do you really want from a performance timer: // What do you really want from a performance timer:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment