summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2014-04-30 02:30:19 +0200
committerFlorent Le Coz <louiz@louiz.org>2014-04-30 02:30:19 +0200
commit18b27793de8863f58b284ee791a8207a79738b85 (patch)
tree1fc7b4b95503a5fe3ea3b480a957237628918271
parentdd552b1e3401fed2bbce61c02fe68f8776d95da3 (diff)
downloadbiboumi-18b27793de8863f58b284ee791a8207a79738b85.tar.gz
biboumi-18b27793de8863f58b284ee791a8207a79738b85.tar.bz2
biboumi-18b27793de8863f58b284ee791a8207a79738b85.tar.xz
biboumi-18b27793de8863f58b284ee791a8207a79738b85.zip
Use epoll on linux by default, poll otherwise
-rw-r--r--CMakeLists.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9c1cc5f..943206e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,8 +39,12 @@ else()
message("Building without systemd daemon support.")
endif()
-set(POLLER "POLL" CACHE STRING
- "Choose the poller between POLL and EPOLL (Linux-only)")
+set(POLLER_DOCSTRING "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
(NOT ${POLLER} MATCHES "EPOLL"))
message(FATAL_ERROR "POLLER must be either POLL or EPOLL")