The old syntax works, and I renamed file as f (good point).<br><br>Thank you.<br><br><br><br><div class="gmail_quote">2011/6/22 Michael Wild <span dir="ltr">&lt;<a href="mailto:themiwi@gmail.com">themiwi@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On 06/22/2011 04:11 PM, Maxime Lecourt wrote:<br>
&gt; Hello,<br>
&gt;<br>
&gt; I&#39;m using CMake to do some OCaml building.<br>
&gt;<br>
&gt; I launch the build command, using add_custom_command, so for the build<br>
&gt; to actually trigger, I added the add_custom_target command.<br>
&gt;<br>
&gt; Which I thought I did fine :<br>
&gt;<br>
&gt; MACRO(OCAML_OPT LIST_OF_FILES)<br>
&gt;     message(STATUS ${LIST_OF_FILES})<br>
&gt;     FOREACH(FILE IN LISTS ${LIST_OF_FILES})<br>
<br>
</div>      foreach(F IN LISTS LIST_OF_FILES)<br>
<br>
i.e. you pass the *name* of the list, not the elements. Otherwise, use<br>
the old syntax<br>
<br>
      foreach(F ${LIST_OF_FILES})<br>
<br>
Also, try not to use built-in variables or command names for your own<br>
variable names.<br>
<br>
<br>
Michael<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br>