This is an automated email from the ASF dual-hosted git repository.

wzhou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git

commit b45cd1bf0234de8ce7ac17565eca6c1503d1aad8
Author: Zoltan Borok-Nagy <[email protected]>
AuthorDate: Tue Sep 28 12:01:42 2021 +0200

    IMPALA-10933: Impala build finds system libcurl instead of toolchain version
    
    This patch modifies FindCurl.cmake to ignore the system version
    of libcurl. Without this patch the build might find a wrong
    version of libcurl which causes errors during link time.
    
    Change-Id: I3c2d315e9bc06b9b926a492fa8d3729baddc2c82
    Reviewed-on: http://gerrit.cloudera.org:8080/17876
    Reviewed-by: Wenzhe Zhou <[email protected]>
    Tested-by: Impala Public Jenkins <[email protected]>
---
 cmake_modules/FindCurl.cmake | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/cmake_modules/FindCurl.cmake b/cmake_modules/FindCurl.cmake
index 04a3bcd..c8b60f3 100644
--- a/cmake_modules/FindCurl.cmake
+++ b/cmake_modules/FindCurl.cmake
@@ -34,8 +34,17 @@ find_path(CURL_INCLUDE_DIR NAMES curl/curl.h PATHS
   NO_DEFAULT_PATH
 )
 
-find_library(CURL_STATIC_LIB NAMES libcurl.a PATHS ${CURL_SEARCH_LIB_PATH})
-find_library(CURL_SHARED_LIB NAMES libcurl.so PATHS ${CURL_SEARCH_LIB_PATH})
+find_library(CURL_STATIC_LIB NAMES libcurl.a PATHS
+  ${CURL_SEARCH_LIB_PATH}
+  # make sure we don't accidentally pick up a different version
+  NO_DEFAULT_PATH
+)
+
+find_library(CURL_SHARED_LIB NAMES libcurl.so PATHS
+  ${CURL_SEARCH_LIB_PATH}
+  # make sure we don't accidentally pick up a different version
+  NO_DEFAULT_PATH
+)
 
 if (NOT CURL_INCLUDE_DIR OR NOT CURL_STATIC_LIB)
   message(FATAL_ERROR "Curl includes and libraries NOT found. "

Reply via email to