File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,6 +37,21 @@ find_library(ZeroMQ_LIBRARY
3737set ( ZeroMQ_LIBRARIES ${ZeroMQ_LIBRARY} )
3838set ( ZeroMQ_INCLUDE_DIRS ${ZeroMQ_INCLUDE_DIR} )
3939
40+ # check for zmq_ppoll
41+ if (ZeroMQ_LIBRARIES)
42+ include (CheckCXXSymbolExists )
43+ set (CMAKE_REQUIRED_LIBRARIES ${ZeroMQ_LIBRARIES} )
44+ set (CMAKE_REQUIRED_INCLUDES ${ZeroMQ_INCLUDE_DIRS} )
45+ set (CMAKE_REQUIRED_DEFINITIONS "-DZMQ_BUILD_DRAFT_API" )
46+ check_cxx_symbol_exists (zmq_ppoll zmq.h ZeroMQ_HAS_PPOLL )
47+ if (NOT ZeroMQ_HAS_PPOLL)
48+ message (SEND_ERROR "ZeroMQ library was compiled without draft API support (-DENABLE_DRAFTS)." )
49+ endif ()
50+ unset (CMAKE_REQUIRED_LIBRARIES)
51+ unset (CMAKE_REQUIRED_INCLUDES)
52+ unset (CMAKE_REQUIRED_DEFINITIONS)
53+ endif ()
54+
4055include ( FindPackageHandleStandardArgs )
4156# handle the QUIETLY and REQUIRED arguments and set ZeroMQ_FOUND to TRUE
4257# if all listed variables are TRUE
You can’t perform that action at this time.
0 commit comments