mirror of
https://github.com/etlegacy/etlegacy-libs.git
synced 2025-02-24 12:11:11 +00:00
12 lines
336 B
CMake
12 lines
336 B
CMake
# File containing various utilities
|
|
|
|
# Returns a list of arguments that evaluate to true
|
|
function(count_true output_count_var)
|
|
set(lst_len 0)
|
|
foreach(option_var IN LISTS ARGN)
|
|
if(${option_var})
|
|
math(EXPR lst_len "${lst_len} + 1")
|
|
endif()
|
|
endforeach()
|
|
set(${output_count_var} ${lst_len} PARENT_SCOPE)
|
|
endfunction()
|