Thanks Tyler, that works indeed. It seems very obvious now actually. For people reading this thread in the archive, the following works:<br><br>SET( sources s1.cpp s2.cpp s3.cpp )<br>SET( arguments -c1 2 )<br>LIST( APPEND arguments ${sources} ) <br>
ADD_CUSTOM_COMMAND( TARGET test<br> PRE_BUILD<br> COMMAND "../test.py" ${arguments} )<br><br>Iman<br><br><div class="gmail_quote">
On Mon, Jun 1, 2009 at 4:47 PM, Tyler Roscoe <span dir="ltr"><<a href="mailto:tyler@cryptio.net">tyler@cryptio.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Mon, Jun 01, 2009 at 04:31:33PM -0400, Iman Brouwer wrote:<br>
> #Add the source files<br>
> FOREACH( cpp ${sources } )<br>
> SET( arguments "${arguments} ${cpp}" )<br>
> ENDFOREACH( cpp )<br>
> add_custom_command( TARGET test COMMAND "script.py" "${arguments}" )<br>
<br>
</div>I think that will work if you get rid of the "" around ${arguments}.<br>
<br>
You also might want to look at the VERBATIM parameter to<br>
add_custom_command().<br>
<font color="#888888"><br>
tyler<br>
</font></blockquote></div><br>