Implement async DNS resolution using c-ares

fix #2533
This commit is contained in:
Florent Le Coz
2015-02-23 13:56:08 +01:00
parent a17135720e
commit b86547dc1e
11 changed files with 499 additions and 13 deletions
+13
View File
@@ -39,6 +39,12 @@ elseif(NOT WITHOUT_BOTAN)
find_package(BOTAN)
endif()
if(WITH_CARES)
find_package(CARES REQUIRED)
elseif(NOT WITHOUT_CARES)
find_package(CARES)
endif()
#
## Get the software version
#
@@ -84,6 +90,10 @@ if(BOTAN_FOUND)
include_directories(SYSTEM ${BOTAN_INCLUDE_DIRS})
endif()
if(CARES_FOUND)
include_directories(${CARES_INCLUDE_DIRS})
endif()
set(POLLER_DOCSTRING "Choose the poller between POLL and EPOLL (Linux-only)")
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(POLLER "EPOLL" CACHE STRING ${POLLER_DOCSTRING})
@@ -145,6 +155,9 @@ target_link_libraries(network logger)
if(BOTAN_FOUND)
target_link_libraries(network ${BOTAN_LIBRARIES})
endif()
if(CARES_FOUND)
target_link_libraries(network ${CARES_LIBRARIES})
endif()
#
## irclib