From c11d73d6a82b92cc69f0f7f53347e27554eb209a Mon Sep 17 00:00:00 2001 From: Vincent Stumpf Date: Thu, 25 May 2023 04:41:47 +0000 Subject: [PATCH] Add epoll support --- CMakeLists.txt | 1 + src/common/CMakeLists.txt | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5aa7249e0d..4415fe7d92 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,6 +17,7 @@ option(ENABLE_MEMMGR "Enable memory manager (default=ON)" ON) # set(ENABLE_MEMORY "system" CACHE STRING "Enable memory library (default=system)") option(ENABLE_PROFILER "Enable profiler (default=OFF)" OFF) option(ENABLE_EXTRA_BUILDBOT_CODE "Enable extra buildbot code (default=OFF)" OFF) +option(ENABLE_EPOLL "Use epoll instead of select (default=OFF)" OFF) # Set a default build type if none was specified diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index bf1d339d5b..02d4ae2017 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -182,6 +182,10 @@ if(ENABLE_EXTRA_BUILDBOT_CODE) target_compile_definitions(common PUBLIC "-DBUILDBOT") endif() +if(ENABLE_EPOLL) + target_compile_definitions(common PRIVATE "-DSOCKET_EPOLL") +endif() + target_include_directories(common PUBLIC "${MYSQL_INCLUDE_DIRS}" "${ZLIB_INCLUDE_DIRS}"