From 09b0018b938bfbbe0d5b5363b8e011aa7bfbf2f2 Mon Sep 17 00:00:00 2001 From: Aris Adamantiadis Date: Tue, 24 May 2011 23:26:18 +0200 Subject: Introduced ssh_timeout_elapsed functions Functions to mesure elapsed time before and after a serie of calls. Introduces a dependancy to clock_gettime() and librt, hope this doesn't break anything. Porting to gettimeofday() should not be too hard. (cherry picked from commit 59f7647cd97c62ab7a26725e5a166dcb54b27bc6) --- ConfigureChecks.cmake | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ConfigureChecks.cmake') diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index b4f5cf6f..683c8eb5 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -119,6 +119,11 @@ if (UNIX) check_function_exists(regcomp HAVE_REGCOMP) endif (UNIX) +check_library_exists(rt clock_gettime "" HAVE_LIBRT) +if (HAVE_LIBRT) + set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} rt) +endif (HAVE_LIBRT) + set(LIBSSH_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CACHE INTERNAL "libssh required system libraries") # LIBRARIES -- cgit