Commit 18b27793 authored by louiz’'s avatar louiz’

Use epoll on linux by default, poll otherwise

parent dd552b1e
...@@ -39,8 +39,12 @@ else() ...@@ -39,8 +39,12 @@ else()
message("Building without systemd daemon support.") message("Building without systemd daemon support.")
endif() endif()
set(POLLER "POLL" CACHE STRING set(POLLER_DOCSTRING "Choose the poller between POLL and EPOLL (Linux-only)")
"Choose the poller between POLL and EPOLL (Linux-only)") if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(POLLER "EPOLL" CACHE STRING ${POLLER_DOCSTRING})
else()
set(POLLER "POLL" CACHE STRING ${POLLER_DOCSTRING})
endif()
if((NOT ${POLLER} MATCHES "POLL") AND if((NOT ${POLLER} MATCHES "POLL") AND
(NOT ${POLLER} MATCHES "EPOLL")) (NOT ${POLLER} MATCHES "EPOLL"))
message(FATAL_ERROR "POLLER must be either POLL or EPOLL") message(FATAL_ERROR "POLLER must be either POLL or EPOLL")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment