Skip to content

Commit

Permalink
backport fixed check for kqueue
Browse files Browse the repository at this point in the history
  • Loading branch information
minrk committed Feb 23, 2024
1 parent 24a1c06 commit 88bedcd
Showing 1 changed file with 36 additions and 18 deletions.
54 changes: 36 additions & 18 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -239,24 +239,24 @@ if (ZMQ_PREFIX STREQUAL "bundled")
--enable-static
)
list(APPEND libsodium_configure ${PYZMQ_LIBSODIUM_CONFIGURE_ARGS})
execute_process(
COMMAND ${libsodium_configure}
WORKING_DIRECTORY ${bundled_libsodium_SOURCE_DIR}
COMMAND_ECHO STDOUT
COMMAND_ERROR_IS_FATAL ANY
)
execute_process(
COMMAND make
WORKING_DIRECTORY ${bundled_libsodium_SOURCE_DIR}
COMMAND_ECHO STDOUT
COMMAND_ERROR_IS_FATAL ANY
)
execute_process(
COMMAND make install
WORKING_DIRECTORY ${bundled_libsodium_SOURCE_DIR}
COMMAND_ECHO STDOUT
COMMAND_ERROR_IS_FATAL ANY
)
# execute_process(
# COMMAND ${libsodium_configure}
# WORKING_DIRECTORY ${bundled_libsodium_SOURCE_DIR}
# COMMAND_ECHO STDOUT
# COMMAND_ERROR_IS_FATAL ANY
# )
# execute_process(
# COMMAND make
# WORKING_DIRECTORY ${bundled_libsodium_SOURCE_DIR}
# COMMAND_ECHO STDOUT
# COMMAND_ERROR_IS_FATAL ANY
# )
# execute_process(
# COMMAND make install
# WORKING_DIRECTORY ${bundled_libsodium_SOURCE_DIR}
# COMMAND_ECHO STDOUT
# COMMAND_ERROR_IS_FATAL ANY
# )
endif()
endif()

Expand All @@ -272,6 +272,24 @@ if (ZMQ_PREFIX STREQUAL "bundled")
set(BUILD_TESTS OFF)
set(BUILD_SHARED OFF)
set(BUILD_STATIC ON)

if(NOT MSVC)
# backport check for kqueue, which is wrong in libzmq 4.3.5
# libzmq's cmake will proceed with the rest
# https://github.com/zeromq/libzmq/pull/4659
include(CheckCXXSymbolExists)
set(POLLER
""
CACHE STRING "Choose polling system for I/O threads. valid values are
kqueue, epoll, devpoll, pollset, poll or select [default=autodetect]")
if(POLLER STREQUAL "")
check_cxx_symbol_exists(kqueue "sys/types.h;sys/event.h;sys/time.h" HAVE_KQUEUE)
if(HAVE_KQUEUE)
set(POLLER "kqueue")
endif()
endif()
endif()

if(MSVC)
set(API_POLLER "select" CACHE STRING "Set API Poller (default: select)")
endif()
Expand Down

0 comments on commit 88bedcd

Please sign in to comment.