mirror of
https://github.com/curl/curl.git
synced 2025-01-18 14:04:30 +08:00
CMake: Remove unused 'output_var' from 'collect_true'
Variable 'output_var' is not used and can be removed. Function 'collect_true' renamed to 'count_true'.
This commit is contained in:
parent
fac400da03
commit
b4db3a8a07
@ -1,14 +1,13 @@
|
|||||||
# File containing various utilities
|
# File containing various utilities
|
||||||
|
|
||||||
# Returns a list of arguments that evaluate to true
|
# Returns a list of arguments that evaluate to true
|
||||||
function(collect_true output_var output_count_var)
|
function(count_true output_count_var)
|
||||||
set(${output_var})
|
set(lst)
|
||||||
foreach(option_var IN LISTS ARGN)
|
foreach(option_var IN LISTS ARGN)
|
||||||
if(${option_var})
|
if(${option_var})
|
||||||
list(APPEND ${output_var} ${option_var})
|
list(APPEND lst ${option_var})
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
set(${output_var} ${${output_var}} PARENT_SCOPE)
|
list(LENGTH lst lst_len)
|
||||||
list(LENGTH ${output_var} ${output_count_var})
|
set(${output_count_var} ${lst_len} PARENT_SCOPE)
|
||||||
set(${output_count_var} ${${output_count_var}} PARENT_SCOPE)
|
|
||||||
endfunction()
|
endfunction()
|
||||||
|
@ -309,13 +309,13 @@ if(WIN32 OR CMAKE_USE_DARWINSSL OR CMAKE_USE_WINSSL OR CMAKE_USE_MBEDTLS)
|
|||||||
endif()
|
endif()
|
||||||
option(CMAKE_USE_OPENSSL "Use OpenSSL code. Experimental" ${openssl_default})
|
option(CMAKE_USE_OPENSSL "Use OpenSSL code. Experimental" ${openssl_default})
|
||||||
|
|
||||||
collect_true(enabled_ssl_options enabled_ssl_options_count
|
count_true(enabled_ssl_options_count
|
||||||
CMAKE_USE_WINSSL
|
CMAKE_USE_WINSSL
|
||||||
CMAKE_USE_DARWINSSL
|
CMAKE_USE_DARWINSSL
|
||||||
CMAKE_USE_OPENSSL
|
CMAKE_USE_OPENSSL
|
||||||
CMAKE_USE_MBEDTLS
|
CMAKE_USE_MBEDTLS
|
||||||
)
|
)
|
||||||
if(enabled_ssl_options_count GREATER 1)
|
if(enabled_ssl_options_count GREATER "1")
|
||||||
set(CURL_WITH_MULTI_SSL ON)
|
set(CURL_WITH_MULTI_SSL ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user