CHECK_LIBRARY_EXISTS(rt clock_gettime "" HAVE_POSIX_GETTIME)
CHECK_LIBRARY_EXISTS(pthread pthread_create "" HAVE_PTHREAD)
-CHECK_LIBRARY_EXISTS(pthread sem_init "" HAVE_SEM_INIT_LIB)
+if(NOT APPLE) # OS X El Capitan deprecates this function
+ CHECK_LIBRARY_EXISTS(pthread sem_init "" HAVE_SEM_INIT_LIB)
+endif()
CHECK_LIBRARY_EXISTS(pthread sem_open "" HAVE_SEM_OPEN_LIB)
set(HAVE_PTHREAD_SETAFFINITY 0)
CHECK_LIBRARY_EXISTS(pthread pthread_setaffinity_np "" HAVE_PTHREAD_SETAFFINITY)
endif()
endif()
file(REMOVE sem_init)
+ else()
+ set(HAVE_SEM_INIT 0)
endif()
if(NOT HAVE_SEM_OPEN AND NOT HAVE_SEM_INIT)