diff --git a/cmake/modules/FindZeroMQ.cmake b/cmake/modules/FindZeroMQ.cmake index 6075e5047596b..e8c2889962e3b 100644 --- a/cmake/modules/FindZeroMQ.cmake +++ b/cmake/modules/FindZeroMQ.cmake @@ -37,6 +37,21 @@ find_library(ZeroMQ_LIBRARY set ( ZeroMQ_LIBRARIES ${ZeroMQ_LIBRARY} ) set ( ZeroMQ_INCLUDE_DIRS ${ZeroMQ_INCLUDE_DIR} ) +# check for zmq_ppoll +if(ZeroMQ_LIBRARIES) + include(CheckCXXSymbolExists) + set(CMAKE_REQUIRED_LIBRARIES ${ZeroMQ_LIBRARIES}) + set(CMAKE_REQUIRED_INCLUDES ${ZeroMQ_INCLUDE_DIRS}) + set(CMAKE_REQUIRED_DEFINITIONS "-DZMQ_BUILD_DRAFT_API") + check_cxx_symbol_exists(zmq_ppoll zmq.h ZeroMQ_HAS_PPOLL) + if(NOT ZeroMQ_HAS_PPOLL) + message(SEND_ERROR "ZeroMQ library was compiled without draft API support (-DENABLE_DRAFTS).") + endif() + unset(CMAKE_REQUIRED_LIBRARIES) + unset(CMAKE_REQUIRED_INCLUDES) + unset(CMAKE_REQUIRED_DEFINITIONS) +endif() + include ( FindPackageHandleStandardArgs ) # handle the QUIETLY and REQUIRED arguments and set ZeroMQ_FOUND to TRUE # if all listed variables are TRUE diff --git a/cmake/modules/RootBuildOptions.cmake b/cmake/modules/RootBuildOptions.cmake index f4bb748557412..59f0fded3cd5c 100644 --- a/cmake/modules/RootBuildOptions.cmake +++ b/cmake/modules/RootBuildOptions.cmake @@ -150,7 +150,7 @@ ROOT_BUILD_OPTION(pythia8 OFF "Enable support for Pythia 8.x [GPL]") ROOT_BUILD_OPTION(qt6web OFF "Enable support for Qt6 web-based display (requires Qt6::WebEngineCore and Qt6::WebEngineWidgets)") ROOT_BUILD_OPTION(r OFF "Enable support for R bindings (requires R, Rcpp, and RInside)") ROOT_BUILD_OPTION(roofit ON "Build the advanced fitting package RooFit, and RooStats for statistical tests. If xml is available, also build HistFactory.") -ROOT_BUILD_OPTION(roofit_multiprocess OFF "Build RooFit::MultiProcess and multi-process RooFit::TestStatistics classes (requires ZeroMQ >= 3.4.5 built with -DENABLE_DRAFTS and cppzmq).") +ROOT_BUILD_OPTION(roofit_multiprocess OFF "Build RooFit::MultiProcess and multi-process RooFit::TestStatistics classes (requires ZeroMQ >= 4.3.5 built with -DENABLE_DRAFTS and cppzmq).") ROOT_BUILD_OPTION(root7 ON "Build ROOT 7 experimental components of ROOT") ROOT_BUILD_OPTION(runtime_cxxmodules ON "Enable runtime support for C++ modules") ROOT_BUILD_OPTION(shadowpw OFF "Enable support for shadow passwords")