mirror of
https://github.com/moparisthebest/curl
synced 2024-11-16 06:25:03 -05:00
b4db3a8a07
Variable 'output_var' is not used and can be removed. Function 'collect_true' renamed to 'count_true'.
14 lines
352 B
CMake
14 lines
352 B
CMake
# File containing various utilities
|
|
|
|
# Returns a list of arguments that evaluate to true
|
|
function(count_true output_count_var)
|
|
set(lst)
|
|
foreach(option_var IN LISTS ARGN)
|
|
if(${option_var})
|
|
list(APPEND lst ${option_var})
|
|
endif()
|
|
endforeach()
|
|
list(LENGTH lst lst_len)
|
|
set(${output_count_var} ${lst_len} PARENT_SCOPE)
|
|
endfunction()
|