summaryrefslogtreecommitdiffstats
path: root/cmake/config.cmake
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-08-02 04:17:57 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-08-02 06:08:18 +0200
commit96a291d11f884b18356ba8ef4b12b82d658d8d04 (patch)
tree8ad328375c4b1754e69cd38ee4e2e13d60c28525 /cmake/config.cmake
parente63fe3b8d058bed15d65728f8e9a7e4093040028 (diff)
downloadfastd-96a291d11f884b18356ba8ef4b12b82d658d8d04.tar
fastd-96a291d11f884b18356ba8ef4b12b82d658d8d04.zip
Add support for Mac OS X
Diffstat (limited to 'cmake/config.cmake')
-rw-r--r--cmake/config.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/cmake/config.cmake b/cmake/config.cmake
index e77abc8..c40ee9f 100644
--- a/cmake/config.cmake
+++ b/cmake/config.cmake
@@ -4,6 +4,12 @@ else()
set(LINUX FALSE)
endif()
+if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ set(DARWIN TRUE)
+else()
+ set(DARWIN FALSE)
+endif()
+
set(USE_BINDTODEVICE ${LINUX})
set(USE_EPOLL ${LINUX})
@@ -12,6 +18,9 @@ set(USE_PMTU ${LINUX})
set(USE_PKTINFO ${LINUX})
set(USE_PACKET_MARK ${LINUX})
+# OSX doesn't support poll on devices...
+set(USE_SELECT ${DARWIN})
+
if(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
set(USE_MULTIAF_BIND FALSE)
else()