I want to check whether a lists contains a specific entry like in the following code snippet:
macro(foo)
if ($(ARGN} contains "bar")
...
endif
endmacro()
CMake does not offer a contains
. What is best / easiest way to get the desired result?
In CMake's wiki, I found a LIST_CONTAINS
macro, but the wiki page is outdated. Is this still the best way to go, or has CMake gained new capabilities?