<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>"Rolf Eike Beer"
<eike@sf-mail.de></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 "input" files change</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=2><tt>> foreach(in_file ${ARGN})<br>
><br>
> ....<br>
><br>
> ADD_CUSTOM_COMMAND(<br>
> OUTPUT ${IDL_OUTPUT_DIR}/${out_file}.h<br>
> ${IDL_OUTPUT_DIR}/${out_file}.tlb<br>
> DEPENDS ${in_file}<br>
> COMMAND(${MIDL_EXECUTABLE} ${in_file}
<insert other args here><br>
> WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}<br>
> )<br>
><br>
> ....<br>
><br>
> endforeach()<br>
><br>
> i'm using this to generate files from IDL files so i can neatly list
them<br>
> and because there is no way to set the working directory for the midl
tool<br>
> in cmake<br>
><br>
> I didn't put the rest of the file here because it's on another computer<br>
> and i had to copy this by writing it.<br>
><br>
> from what i read in the "Mastering CMake" book, the DEPENDS
thing should<br>
> work.<br>
><br>
> I'v had 2 variations to the value, with absolute path and with relative,<br>
> neither work.<br>
><br>
> I checked that they were correct by writing the value out with the<br>
> 'message' command and by testing the path printed out.<br>
><br>
> 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 "just work"
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>