aboutsummaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9415c4d44fb..68d0a4fe64e 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -245,6 +245,21 @@ include(cmake/exec.cmake)
include(cmake/plugin.cmake)
##############################################################################
+# FreeBSD - use epoll-shim
+##############################################################################
+set(EPOLL_LIB "")
+if("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
+ find_path(EPOLL_SHIM_INCLUDE_DIR NAMES sys/epoll.h HINTS /usr/local/include/libepoll-shim)
+ find_library(EPOLL_SHIM_LIB NAMES epoll-shim HINTS /usr/local/lib)
+
+ if(EPOLL_SHIM_INCLUDE_DIR AND EPOLL_SHIM_LIB)
+ message(STATUS "Found epoll-shim in ${EPOLL_SHIM_INCLUDE_DIR}")
+ include_directories(${EPOLL_SHIM_INCLUDE_DIR})
+ string(JOIN " " EPOLL_LIB "${EPOLL_SHIM_LIB}")
+ endif()
+endif()
+
+##############################################################################
# subdirs - order matters
##############################################################################
option(VPP_HOST_TOOLS_ONLY "Build only host tools" OFF)