[Cmake] Converting from CMake 1.6 to CMake 1.8

Randy Casstevens r_casste at hotmail.com
Mon, 26 Jan 2004 17:52:09 -0500


<html><div style='background-color:'><DIV class=RTE>
<P>When converting from CMake 1.6 to CMake 1.8, we ran into a problem with<BR>one of our targets.</P>
<P>Here is&nbsp;some example code that illustrates the problem:</P>
<P>&gt; FOREACH(MY_TARGET<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; target1 target2 target3)<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; ADD_CUSTOM_TARGET(${MY_TARGET} some command...)<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; ADD_CUSTOM_COMMAND(<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; TARGET run<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; DEPENDS ${MY_TARGET}<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; )<BR>&gt; ENDFOREACH(MY_TARGET)</P>
<P>When using CMake 1.6, the targets would be added to the dependency list<BR>for the run target.&nbsp; But, when we converted to CMake 1.8, the targets were<BR>not added to the dependency list.&nbsp; Why did this happen?&nbsp; How can it be<BR>fixed?</P>
<P>Thanks</P>
<P><BR><BR>&nbsp;</P></DIV></div><br clear=all><hr> <a href="http://g.msn.com/8HMBENUS/2731??PS=">There are now three new levels of MSN Hotmail Extra Storage!  Learn more.</a> </html>