diff --git a/CMakeLists.txt b/CMakeLists.txt index cb72bb782ec5..0c2135ffc4d1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -124,10 +124,12 @@ endif(USE_AVX) if ((NOT MSVC) AND USE_EPOLL) INCLUDE(CheckIncludeFile) - check_include_file("sys/epoll.h" USE_EPOLL) - if (USE_EPOLL) + check_include_file("sys/epoll.h" EPOLL_AVAILABLE) + if (EPOLL_AVAILABLE) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_EPOLL") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_EPOLL") + else() + message(WARNING "EPOLL is not available on this platform...") endif() endif ()