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