diff --git a/CMakeLists.txt b/CMakeLists.txt index 03954afbc..94d03058b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -564,7 +564,8 @@ if(UNIX OR CYGWIN) if (FREEBSD) list(REMOVE_ITEM CMAKE_REQUIRED_INCLUDES ${EPOLLSHIM_INCLUDE_DIR}) endif() - if(NOT APPLE) + option(WITH_POLL "Check for and include poll.h" ON) + if (WITH_POLL) check_include_files(poll.h HAVE_POLL_H) endif() list(APPEND CMAKE_REQUIRED_LIBRARIES m)