<br><font size=2 face="sans-serif">My cmake version is 2.8.4 </font>
<br>
<br>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>&quot;Rolf Eike Beer&quot;
&lt;eike@sf-mail.de&gt;</b> </font>
<br><font size=1 face="sans-serif">Sent by: cmake-bounces@cmake.org</font>
<p><font size=1 face="sans-serif">08.03.2011 13:21</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">cmake@cmake.org</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">Re: [CMake] Run/build custom command/target
only when &quot;input&quot; files change</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=2><tt>&gt; foreach(in_file ${ARGN})<br>
&gt;<br>
&gt; ....<br>
&gt;<br>
&gt; ADD_CUSTOM_COMMAND(<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; OUTPUT ${IDL_OUTPUT_DIR}/${out_file}.h<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ${IDL_OUTPUT_DIR}/${out_file}.tlb<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; DEPENDS ${in_file}<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; COMMAND(${MIDL_EXECUTABLE} ${in_file}
&lt;insert other args here&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}<br>
&gt; )<br>
&gt;<br>
&gt; ....<br>
&gt;<br>
&gt; endforeach()<br>
&gt;<br>
&gt; i'm using this to generate files from IDL files so i can neatly list
them<br>
&gt; and because there is no way to set the working directory for the midl
tool<br>
&gt; in cmake<br>
&gt;<br>
&gt; I didn't put the rest of the file here because it's on another computer<br>
&gt; and i had to copy this by writing it.<br>
&gt;<br>
&gt; from what i read in the &quot;Mastering CMake&quot; book, the DEPENDS
thing should<br>
&gt; work.<br>
&gt;<br>
&gt; I'v had 2 variations to the value, with absolute path and with relative,<br>
&gt; neither work.<br>
&gt;<br>
&gt; I checked that they were correct by writing the value out with the<br>
&gt; 'message' command and by testing the path printed out.<br>
&gt;<br>
&gt; Did i miss something?<br>
<br>
Providing us the CMake version you are using ;) There was some fixes to<br>
that dependencies stuff in 2.8.4 so maybe it would &quot;just work&quot;
then?<br>
<br>
Eike<br>
_______________________________________________<br>
Powered by www.kitware.com<br>
<br>
Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html<br>
<br>
Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ<br>
<br>
Follow this link to subscribe/unsubscribe:<br>
http://www.cmake.org/mailman/listinfo/cmake<br>
</tt></font>
<br>