mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-27 04:09:36 +03:00
13 lines
336 B
CMake
13 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()
|