aboutsummaryrefslogtreecommitdiff
path: root/CMake
diff options
context:
space:
mode:
authorRuslan Baratov <ruslan_baratov@yahoo.com>2018-07-05 13:11:04 +0300
committerDaniel Stenberg <daniel@haxx.se>2018-07-06 09:35:21 +0200
commitfac400da0348a4897f5ee6f54458c09b7ebabf3d (patch)
treea18ee81a0c595fe93337a0e9d381beece0b95fb0 /CMake
parent6e61668b9c10f60718626feb4cc96a86c55d55cd (diff)
CMake: Remove unused functions
Closes #2711
Diffstat (limited to 'CMake')
-rw-r--r--CMake/Utilities.cmake30
1 files changed, 0 insertions, 30 deletions
diff --git a/CMake/Utilities.cmake b/CMake/Utilities.cmake
index 005b166ff..8425bbd78 100644
--- a/CMake/Utilities.cmake
+++ b/CMake/Utilities.cmake
@@ -1,35 +1,5 @@
# File containing various utilities
-# Converts a CMake list to a string containing elements separated by spaces
-function(TO_LIST_SPACES _LIST_NAME OUTPUT_VAR)
- set(NEW_LIST_SPACE)
- foreach(ITEM ${${_LIST_NAME}})
- set(NEW_LIST_SPACE "${NEW_LIST_SPACE} ${ITEM}")
- endforeach()
- string(STRIP ${NEW_LIST_SPACE} NEW_LIST_SPACE)
- set(${OUTPUT_VAR} "${NEW_LIST_SPACE}" PARENT_SCOPE)
-endfunction()
-
-# Appends a lis of item to a string which is a space-separated list, if they don't already exist.
-function(LIST_SPACES_APPEND_ONCE LIST_NAME)
- string(REPLACE " " ";" _LIST ${${LIST_NAME}})
- list(APPEND _LIST ${ARGN})
- list(REMOVE_DUPLICATES _LIST)
- to_list_spaces(_LIST NEW_LIST_SPACE)
- set(${LIST_NAME} "${NEW_LIST_SPACE}" PARENT_SCOPE)
-endfunction()
-
-# Convenience function that does the same as LIST(FIND ...) but with a TRUE/FALSE return value.
-# Ex: IN_STR_LIST(MY_LIST "Searched item" WAS_FOUND)
-function(IN_STR_LIST LIST_NAME ITEM_SEARCHED RETVAL)
- list(FIND ${LIST_NAME} ${ITEM_SEARCHED} FIND_POS)
- if(${FIND_POS} EQUAL -1)
- set(${RETVAL} FALSE PARENT_SCOPE)
- else()
- set(${RETVAL} TRUE PARENT_SCOPE)
- endif()
-endfunction()
-
# Returns a list of arguments that evaluate to true
function(collect_true output_var output_count_var)
set(${output_var})