diff options
Diffstat (limited to 'Utilities/cmcurl/CMake/Utilities.cmake')
-rw-r--r-- | Utilities/cmcurl/CMake/Utilities.cmake | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Utilities/cmcurl/CMake/Utilities.cmake b/Utilities/cmcurl/CMake/Utilities.cmake new file mode 100644 index 0000000..ffc411a --- /dev/null +++ b/Utilities/cmcurl/CMake/Utilities.cmake @@ -0,0 +1,12 @@ +# 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() |