summaryrefslogtreecommitdiff
path: root/CMake/Utilities.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'CMake/Utilities.cmake')
-rw-r--r--CMake/Utilities.cmake5
1 files changed, 2 insertions, 3 deletions
diff --git a/CMake/Utilities.cmake b/CMake/Utilities.cmake
index 5cb1d4497..ffc411ae9 100644
--- a/CMake/Utilities.cmake
+++ b/CMake/Utilities.cmake
@@ -2,12 +2,11 @@
# Returns a list of arguments that evaluate to true
function(count_true output_count_var)
- set(lst)
+ set(lst_len 0)
foreach(option_var IN LISTS ARGN)
if(${option_var})
- list(APPEND lst ${option_var})
+ math(EXPR lst_len "${lst_len} + 1")
endif()
endforeach()
- list(LENGTH lst lst_len)
set(${output_count_var} ${lst_len} PARENT_SCOPE)
endfunction()