From 70e6be3d6e82cbdc7a8ca5e9f2a1e0d95ece17c2 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Thu, 22 Mar 2018 21:43:06 -0500 Subject: [PATCH] move clock_gettime check out --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a67405a..37ef9c9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -283,8 +283,11 @@ endif() if(WIN32) set(OPENSSL_LIBS ${OPENSSL_LIBS} ws2_32) endif() +check_library_exists(rt clock_gettime "time.h" HAVE_CLOCK_GETTIME) +if (HAVE_CLOCK_GETTIME) + add_definitions(-DHAVE_CLOCK_GETTIME) +endif() if(CMAKE_SYSTEM_NAME MATCHES "Linux") - check_library_exists(rt clock_gettime "time.h" HAVE_CLOCK_GETTIME) if (HAVE_CLOCK_GETTIME) set(OPENSSL_LIBS ${OPENSSL_LIBS} rt) endif()