title: Best way to check with CMake whether list containts a specific entry
body: <p>I want to check whether a lists contains a specific entry like in the following code snipplet:</p>
  
  <pre><code>macro(foo)
  if ($(ARGN} contains "bar")
    ...
  endif
  endmacro()
  </code></pre>
  
  <p>CMake does not offer a <code>contains</code>. What is best / easiest way to get the desired result?</p>
  
  <p>In CMake's <a href="http://www.cmake.org/Wiki/CMakeMacroListOperations#LIST_CONTAINS">wiki</a> 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?</p>