I want to check whether a lists contains a specific entry like in the following code snipplet:
macro(foo) if ($(ARGN} contains \"bar\") ... endif endmacro() >
If the intention here is to add a value to a list but only if it's not already in the list, then an alternative approach is to just add it to the list and immediately remove possible duplicates again:
list(APPEND SOME_LIST "value") list(REMOVE_DUPLICATES SOME_LIST)