From fc9312f7175fa36300b3ba6534b54bcd0d00ab7e Mon Sep 17 00:00:00 2001 From: Rolf Eike Beer Date: Mon, 24 Feb 2020 13:34:54 +0100 Subject: CMake: clean up and improve build procedures - remove check for unsupported old CMake versions - do not link to c-ares library twice - modernize custom Find modules - FindLibSSH2: - pass version to FPHSA to show it in the output - use LIBSSH2_VERSION define to extract the version number in one shot. This variable exists in the header for 10 years. - remove unneeded code - FindNGHTTP2.cmake: - drop needless FPHSA argument - mark found variables as advanced - FindNSS.cmake: - show version number - FindCARES.cmake: - drop default paths - use FPHSA instead of checking things by hand - remove needless explict variable dereference - simplify count_true() - allow all policies up to version 3.16 to be set to NEW - do not rerun check for -Wstrict-aliasing=3 every time In contrast to every other compiler flag this has a = in it, which CMake can't have in a variable name. - only read the interesting strings from curlver.h Reviewed-by: Peter Wu Closes https://github.com/curl/curl/pull/4975 --- CMake/OtherTests.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CMake/OtherTests.cmake') diff --git a/CMake/OtherTests.cmake b/CMake/OtherTests.cmake index c1c9aa32a..8b150290c 100644 --- a/CMake/OtherTests.cmake +++ b/CMake/OtherTests.cmake @@ -32,7 +32,7 @@ int main(void) { return 0; }" curl_cv_recv) if(curl_cv_recv) - if(NOT DEFINED curl_cv_func_recv_args OR "${curl_cv_func_recv_args}" STREQUAL "unknown") + if(NOT DEFINED curl_cv_func_recv_args OR curl_cv_func_recv_args STREQUAL "unknown") foreach(recv_retv "int" "ssize_t" ) foreach(recv_arg1 "SOCKET" "int" ) foreach(recv_arg2 "char *" "void *" ) @@ -81,7 +81,7 @@ if(curl_cv_recv) string(REGEX REPLACE "^[^,]*,[^,]*,[^,]*,[^,]*,([^,]*)$" "\\1" RECV_TYPE_RETV "${curl_cv_func_recv_args}") endif() - if("${curl_cv_func_recv_args}" STREQUAL "unknown") + if(curl_cv_func_recv_args STREQUAL "unknown") message(FATAL_ERROR "Cannot find proper types to use for recv args") endif() else() -- cgit v1.2.3