From: Gabriel Corona Date: Fri, 5 Jun 2015 09:07:45 +0000 (+0200) Subject: Tentatively fix the detection of ucontext.h in Darwin X-Git-Tag: v3_12~681 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/3d602b8ba51ba42a97797be3b44437df20c9de2c Tentatively fix the detection of ucontext.h in Darwin --- diff --git a/buildtools/Cmake/CompleteInFiles.cmake b/buildtools/Cmake/CompleteInFiles.cmake index d1bd700fa6..7ced0a7316 100644 --- a/buildtools/Cmake/CompleteInFiles.cmake +++ b/buildtools/Cmake/CompleteInFiles.cmake @@ -130,6 +130,10 @@ CHECK_LIBRARY_EXISTS(pthread sem_timedwait "" HAVE_SEM_TIMEDWAIT_LIB) CHECK_LIBRARY_EXISTS(pthread pthread_mutex_timedlock "" HAVE_MUTEX_TIMEDLOCK_LIB) CHECK_LIBRARY_EXISTS(rt clock_gettime "" HAVE_POSIX_GETTIME) +if(CMAKE_SYSTEM_NAME MATCHES "Darwin") + set(CMAKE_REQUIRED_DEFINITIONS -D_XOPEN_SOURCE") +endif() + CHECK_INCLUDE_FILES("time.h;sys/time.h" TIME_WITH_SYS_TIME) CHECK_INCLUDE_FILES("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS) CHECK_INCLUDE_FILE("pthread.h" HAVE_PTHREAD_H)