<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi everyone, like you know i'm relative new the cmake and i'm
    working my way through the book and the documentation but there is
    something that i don't understand in the docs.
    <p>I just want to write a macro that uses as first argument a list
      and then iterates over it.</p>
    <p>The docs show the example:</p>
    <pre><span class="highlighted">macro</span>(_BAR)
  foreach(arg IN LISTS ARGN)
    [...]
  endforeach()
endmacro()

</pre>
    <p>So i wrote this macro:</p>
    <p>macro(bsPrintList list)</p>
    <p>    foreach(l IN LISTS ARGN)</p>
    <p>        message(STATUS "List entry: ${l})<br>
    </p>
    <p>    endforeach()<br>
    </p>
    <p>endmacro()</p>
    <p><br>
    </p>
    <p>I tried all sorts of combinations like foreach(l ${list}) etc.
      but come to no result =(.</p>
    <p><br>
    </p>
    <p>This is a really easy questin so i hope someone can explain to me
      what i'm doing wrong here, next part i'm going to learn are
      functions and how to handle their arguments...</p>
    <p><br>
    </p>
    <p>best regards!<br>
    </p>
  </body>
</html>