summaryrefslogtreecommitdiffstats
path: root/cmake/checks.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/checks.cmake')
-rw-r--r--cmake/checks.cmake20
1 files changed, 11 insertions, 9 deletions
diff --git a/cmake/checks.cmake b/cmake/checks.cmake
index 62d10d0..64dae58 100644
--- a/cmake/checks.cmake
+++ b/cmake/checks.cmake
@@ -38,18 +38,20 @@ int main() {
check_prototype_definition("get_current_dir_name" "char *get_current_dir_name(void)" "NULL" "unistd.h" HAVE_GET_CURRENT_DIR_NAME)
-set(RT_LIBRARY "")
-check_symbol_exists("clock_gettime" "time.h" HAVE_CLOCK_GETTIME)
+if(NOT DARWIN)
+ set(RT_LIBRARY "")
+ check_symbol_exists("clock_gettime" "time.h" HAVE_CLOCK_GETTIME)
-if(NOT HAVE_CLOCK_GETTIME)
- set(RT_LIBRARY "rt")
- list(APPEND CMAKE_REQUIRED_LIBRARIES "rt")
+ if(NOT HAVE_CLOCK_GETTIME)
+ set(RT_LIBRARY "rt")
+ list(APPEND CMAKE_REQUIRED_LIBRARIES "rt")
- check_symbol_exists("clock_gettime" "time.h" HAVE_CLOCK_GETTIME_RT)
- if(NOT HAVE_CLOCK_GETTIME_RT)
+ check_symbol_exists("clock_gettime" "time.h" HAVE_CLOCK_GETTIME_RT)
+ if(NOT HAVE_CLOCK_GETTIME_RT)
message(FATAL_ERROR "clock_gettime() not found")
- endif(NOT HAVE_CLOCK_GETTIME_RT)
-endif(NOT HAVE_CLOCK_GETTIME)
+ endif(NOT HAVE_CLOCK_GETTIME_RT)
+ endif(NOT HAVE_CLOCK_GETTIME)
+endif(NOT DARWIN)
set(CMAKE_EXTRA_INCLUDE_FILES "netinet/if_ether.h")