aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Zakrzewski <slither.jz@gmail.com>2019-04-07 12:38:09 +0200
committerJakub Zakrzewski <slither.jz@gmail.com>2019-04-10 19:12:28 +0200
commitff1cb97517af709e6fb3a7623582a3859cb44a85 (patch)
treefc5125be1de0b2e0c75601918df274b325c7631e
parentbe17f298ff508d62d493d4a8d43e56a1e2861a50 (diff)
cmake: clear CMAKE_REQUIRED_LIBRARIES after each use
This fixes GSSAPI builds with the libraries in a non-standard location. The testing for recv() were failing because it failed to link the Kerberos libraries, which are not needed for this or subsequent tests. fixes #3743 closes #3744
-rw-r--r--CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index abcae6153..594501ec6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -469,6 +469,7 @@ if(NOT CURL_DISABLE_LDAP)
list(APPEND CMAKE_REQUIRED_LIBRARIES ${CMAKE_LBER_LIB})
endif()
check_c_source_compiles("${_SRC_STRING}" NOT_NEED_LBER_H)
+ unset(CMAKE_REQUIRED_LIBRARIES)
if(NOT_NEED_LBER_H)
set(NEED_LBER_H OFF)
@@ -564,6 +565,7 @@ if(CMAKE_USE_LIBSSH2)
check_function_exists(libssh2_scp_send64 HAVE_LIBSSH2_SCP_SEND64)
check_function_exists(libssh2_session_handshake HAVE_LIBSSH2_SESSION_HANDSHAKE)
set(CMAKE_EXTRA_INCLUDE_FILES "")
+ unset(CMAKE_REQUIRED_LIBRARIES)
endif()
endif()
@@ -611,6 +613,7 @@ if(CMAKE_USE_GSSAPI)
if(NOT HAVE_GSS_C_NT_HOSTBASED_SERVICE)
set(HAVE_OLD_GSSMIT ON)
endif()
+ unset(CMAKE_REQUIRED_LIBRARIES)
endif()