From: Azat Khuzhin Date: Tue, 9 Aug 2016 21:27:59 +0000 (+0300) Subject: cmake/solaris: set CMAKE_REQUIRED_LIBRARIES to fix functions detections X-Git-Tag: release-2.1.6-beta~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dc95823cd79d32be8154e94f64f30e61a90850e2;p=libevent cmake/solaris: set CMAKE_REQUIRED_LIBRARIES to fix functions detections Otherwise we will not detect next functions for instance: - gethostbyname_r # and related And now both autotools/cmake builds passes all regress tests in basic env (on solaris of course). Fixes: dns/client_fail_requests_getaddrinfo --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 7ea28e08..81d3ce14 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -215,6 +215,9 @@ if(WIN32) set(CMAKE_REQUIRED_LIBRARIES ws2_32.lib) set(CMAKE_REQUIRED_DEFINITIONS -FIwinsock2.h -FIws2tcpip.h) endif() +if (SOLARIS) + set(CMAKE_REQUIRED_LIBRARIES socket nsl) +endif() # Check if _GNU_SOURCE is available. CHECK_SYMBOL_EXISTS(__GNU_LIBRARY__ "features.h" _GNU_SOURCE)