mirror of
https://github.com/curl/curl.git
synced 2026-08-26 07:33:31 +03:00
CMake: Set at most one SSL library
Ref: https://github.com/curl/curl/pull/1228
This commit is contained in:
parent
c6a97466b9
commit
813263dc3a
3 changed files with 31 additions and 7 deletions
|
|
@ -29,3 +29,16 @@ function(IN_STR_LIST LIST_NAME ITEM_SEARCHED RETVAL)
|
|||
set(${RETVAL} TRUE PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Returns a list of arguments that evaluate to true
|
||||
function(collect_true output_var output_count_var)
|
||||
set(${output_var})
|
||||
foreach(option_var IN LISTS ARGN)
|
||||
if(${option_var})
|
||||
list(APPEND ${output_var} ${option_var})
|
||||
endif()
|
||||
endforeach()
|
||||
set(${output_var} ${${output_var}} PARENT_SCOPE)
|
||||
list(LENGTH ${output_var} ${output_count_var})
|
||||
set(${output_count_var} ${${output_count_var}} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue