remove `#!/usr/bin/env sh`
[liba.git] / cmake / core / list.cmake
blob797351945c9a2f58eb55e2ecb8027abb0b28327b
1 function(list_append var)
2   foreach(arg ${ARGN})
3     list(FIND ${var} ${arg} found)
4     if(${found} EQUAL -1)
5       list(APPEND ${var} ${arg})
6     endif()
7   endforeach()
8   set(${var} ${${var}} PARENT_SCOPE)
9 endfunction()
11 function(list_remove var)
12   foreach(arg ${ARGN})
13     list(FIND ${var} ${arg} found)
14     if(${found} GREATER -1)
15       list(REMOVE_ITEM ${var} ${arg})
16     endif()
17   endforeach()
18   set(${var} ${${var}} PARENT_SCOPE)
19 endfunction()