Hello,<br><br>I&#39;m using CMake to do some OCaml building.<br><br>I launch the build command, using add_custom_command, so for the build to actually trigger, I added the add_custom_target command.<br><br>Which I thought I did fine :<br>
<br>MACRO(OCAML_OPT LIST_OF_FILES)<br>    message(STATUS ${LIST_OF_FILES})<br>    FOREACH(FILE IN LISTS ${LIST_OF_FILES})<br>    message(STATUS ${FILE})<br>    get_filename_component(FILE_ROOT ${FILE} NAME_WE)<br>    add_custom_command(OUTPUT ${output}<br>
        COMMAND ${CMAKE_OCaml_OPT_COMPILER}<br>        &quot;-I ${OCaml_ROOT_DIR}/lib&quot;<br>        &quot;${FILE}&quot;<br>        )<br>    add_custom_target(${NAME_WE}.cmi DEPENDS ${output})<br>    ENDFOREACH(FILE)<br>
ENDMACRO(OCAML_OPT)<br><br><br>But the output of this is<br><br><a href="http://cabs.mlcxml.mlcprint.mlclexer.mllcparser.mlyctoxml.mlmergec.mlsortrec.mliftofor.mlgen.mlreduce.mllabel.mlalgo.mlcalipso.mlfrontc.ml">cabs.mlcxml.mlcprint.mlclexer.mllcparser.mlyctoxml.mlmergec.mlsortrec.mliftofor.mlgen.mlreduce.mllabel.mlalgo.mlcalipso.mlfrontc.ml</a>

<p style="margin: 0px; text-indent: 0px;"><br></p><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Configuring done</p><br><br>So while my LIST_OF_FILES is ok, apparently I mess up somewhere using foreach (but where ?).<br>
<br>The list was created simply using<br><br>set(FRONTC_SOURCES<br>    &quot;<a href="http://cabs.ml">cabs.ml</a>&quot;<br>    &quot;<a href="http://cxml.ml">cxml.ml</a>&quot;<br>    &quot;<a href="http://cprint.ml">cprint.ml</a>&quot;<br>
    &quot;clexer.mll&quot;<br>    &quot;cparser.mly&quot;<br>    &quot;<a href="http://ctoxml.ml">ctoxml.ml</a>&quot;<br>    &quot;<a href="http://mergec.ml">mergec.ml</a>&quot;<br>    &quot;<a href="http://sortrec.ml">sortrec.ml</a>&quot;<br>
    &quot;<a href="http://iftofor.ml">iftofor.ml</a>&quot;<br>    &quot;<a href="http://gen.ml">gen.ml</a>&quot;<br>    &quot;<a href="http://reduce.ml">reduce.ml</a>&quot;<br>    &quot;<a href="http://label.ml">label.ml</a>&quot;<br>
    &quot;<a href="http://algo.ml">algo.ml</a>&quot;<br>    &quot;<a href="http://calipso.ml">calipso.ml</a>&quot;<br>    &quot;<a href="http://frontc.ml">frontc.ml</a>&quot;<br>    )<br><br>Thanks for your help.<br><br>Regards,<br>
<br>Maxime<br>