From 17d27805f9e68fb3fa62e1ed817d2b9f44885ee2 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Thu, 6 Nov 2014 01:32:45 +0100 Subject: cmake: add ENABLE_THREADED_RESOLVER, rename ARES Fix detection of the AsynchDNS feature which not just depends on pthreads support, but also on whether USE_POSIX_THREADS is set or not. Caught by test 1014. This patch adds a new ENABLE_THREADED_RESOLVER option (corresponding to --enable-threaded-resolver of autotools) which also needs a check for HAVE_PTHREAD_H. For symmetry with autotools, CURL_USE_ARES is renamed to ENABLE_ARES (--enable-ares). Checks that test for the availability actually use USE_ARES instead as that is the result of whether a-res is available or not (in practice this does not matter as CARES is marked as required package, but nevertheless it is better to write the intent). Signed-off-by: Peter Wu --- tests/libtest/CMakeLists.txt | 2 +- tests/server/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/libtest/CMakeLists.txt b/tests/libtest/CMakeLists.txt index ef73e553e..cc9d7e1f8 100644 --- a/tests/libtest/CMakeLists.txt +++ b/tests/libtest/CMakeLists.txt @@ -9,7 +9,7 @@ function(SETUP_TEST TEST_NAME) # ARGN are the files in the test ${CURL_BINARY_DIR}/lib # To be able to reach "curl_config.h" ${CURL_BINARY_DIR}/include # To be able to reach "curl/curlbuild.h" ) - if(CURL_USE_ARES) + if(USE_ARES) include_directories(${CARES_INCLUDE_DIR}) endif() diff --git a/tests/server/CMakeLists.txt b/tests/server/CMakeLists.txt index 031d81711..00f5242f9 100644 --- a/tests/server/CMakeLists.txt +++ b/tests/server/CMakeLists.txt @@ -9,7 +9,7 @@ function(SETUP_EXECUTABLE TEST_NAME) # ARGN are the files in the test ${CURL_BINARY_DIR}/lib # To be able to reach "curl_config.h" ${CURL_BINARY_DIR}/include # To be able to reach "curl/curlbuild.h" ) - if(CURL_USE_ARES) + if(USE_ARES) include_directories(${CARES_INCLUDE_DIR}) endif() -- cgit v1.2.3