diff options
author | Brad King <brad.king@kitware.com> | 2014-10-29 23:34:35 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-10-30 15:11:49 (GMT) |
commit | 59242702739b92f1a152e2a2bb32772638fdf5be (patch) | |
tree | 4a2ff78a870f52bb9dd9d098323e67915893d049 /Utilities/cmcurl/CMake/OtherTests.cmake | |
parent | 8d311a813c8807a518631ae63cff55c537d3eb7e (diff) | |
download | CMake-59242702739b92f1a152e2a2bb32772638fdf5be.zip CMake-59242702739b92f1a152e2a2bb32772638fdf5be.tar.gz CMake-59242702739b92f1a152e2a2bb32772638fdf5be.tar.bz2 |
curl: Simplify if() conditions on check result variables
Remove use of an old hack that takes advantage of the auto-dereference
behavior of the if() command to detect if a variable is defined. The
hack has the form:
if("${VAR} MATCHES "^${VAR}$")
where "${VAR}" is a macro argument reference. Use if(DEFINED) instead.
This also avoids warnings for CMake Policy CMP0054.
Diffstat (limited to 'Utilities/cmcurl/CMake/OtherTests.cmake')
-rw-r--r-- | Utilities/cmcurl/CMake/OtherTests.cmake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Utilities/cmcurl/CMake/OtherTests.cmake b/Utilities/cmcurl/CMake/OtherTests.cmake index 9cd5eac..039d189 100644 --- a/Utilities/cmcurl/CMake/OtherTests.cmake +++ b/Utilities/cmcurl/CMake/OtherTests.cmake @@ -44,7 +44,7 @@ if(curl_cv_recv) foreach(recv_arg3 "size_t" "int" "socklen_t" "unsigned int") foreach(recv_arg4 "int" "unsigned int") if(NOT curl_cv_func_recv_done) - set(curl_cv_func_recv_test "UNKNOWN") + unset(curl_cv_func_recv_test CACHE) set(extern_line "extern ${recv_retv} ${signature_call_conv} recv(${recv_arg1}, ${recv_arg2}, ${recv_arg3}, ${recv_arg4})\;") set(EXTRA_DEFINES "${EXTRA_DEFINES_BACKUP}\n${headers_hack}\n${extern_line}\n#define __unused5") curl_check_c_source_compiles(" @@ -107,7 +107,7 @@ if(curl_cv_send) foreach(send_arg3 "size_t" "int" "socklen_t" "unsigned int") foreach(send_arg4 "int" "unsigned int") if(NOT curl_cv_func_send_done) - set(curl_cv_func_send_test "UNKNOWN") + unset(curl_cv_func_send_test CACHE) set(extern_line "extern ${send_retv} ${signature_call_conv} send(${send_arg1}, ${send_arg2}, ${send_arg3}, ${send_arg4})\;") set(EXTRA_DEFINES "${EXTRA_DEFINES_BACKUP}\n${headers_hack}\n${extern_line}\n#define __unused5") curl_check_c_source_compiles(" |