summaryrefslogtreecommitdiff
path: root/CMake
diff options
context:
space:
mode:
authorRuslan Baratov <ruslan_baratov@yahoo.com>2018-07-05 13:21:57 +0300
committerDaniel Stenberg <daniel@haxx.se>2018-07-06 09:35:28 +0200
commitb4db3a8a07f6959271a2bfd5a57ee53f7cf823cc (patch)
treec6d183c7742dd13dfa3ea42d936be940ea738223 /CMake
parentfac400da0348a4897f5ee6f54458c09b7ebabf3d (diff)
downloadcurl-b4db3a8a07f6959271a2bfd5a57ee53f7cf823cc.tar.gz
CMake: Remove unused 'output_var' from 'collect_true'
Variable 'output_var' is not used and can be removed. Function 'collect_true' renamed to 'count_true'.
Diffstat (limited to 'CMake')
-rw-r--r--CMake/Utilities.cmake11
1 files changed, 5 insertions, 6 deletions
diff --git a/CMake/Utilities.cmake b/CMake/Utilities.cmake
index 8425bbd78..5cb1d4497 100644
--- a/CMake/Utilities.cmake
+++ b/CMake/Utilities.cmake
@@ -1,14 +1,13 @@
# File containing various utilities
# Returns a list of arguments that evaluate to true
-function(collect_true output_var output_count_var)
- set(${output_var})
+function(count_true output_count_var)
+ set(lst)
foreach(option_var IN LISTS ARGN)
if(${option_var})
- list(APPEND ${output_var} ${option_var})
+ list(APPEND lst ${option_var})
endif()
endforeach()
- set(${output_var} ${${output_var}} PARENT_SCOPE)
- list(LENGTH ${output_var} ${output_count_var})
- set(${output_count_var} ${${output_count_var}} PARENT_SCOPE)
+ list(LENGTH lst lst_len)
+ set(${output_count_var} ${lst_len} PARENT_SCOPE)
endfunction()