fix: type of liba.version in Python2
[liba.git] / cmake / core / list.cmake
blob30110dfbc3777b92a513390ee11bc49ba70913ab
1 function(list_append var)
2   foreach(arg ${ARGN})
3     list(FIND ${var} ${arg} index)
4     if(${index} 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} index)
14     if(${index} GREATER -1)
15       list(REMOVE_ITEM ${var} ${arg})
16     endif()
17   endforeach()
18   set(${var} ${${var}} PARENT_SCOPE)
19 endfunction()