<div dir="ltr">The DEPENDS of ADD_CUSTOM_TARGET expects file names, not target names. So it can&#39;t find a file named foo...<div><br></div><div>To set up inter-target dependencies, use ADD_DEPENDENCIES.</div><div><br><br>
<div class="gmail_quote">On Mon, Aug 25, 2008 at 9:03 AM, Boris Boesler <span dir="ltr">&lt;<a href="mailto:baembel@gmx.de">baembel@gmx.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi!<br>
<br>
&nbsp;For the cmake-code at the end of this email I get the following error during running make (cmake runs without problems):<br>
<br>
Scanning dependencies of target foo<br>
[ &nbsp;0%] Fooing ..<br>
foo<br>
[ 50%] Built target foo<br>
Scanning dependencies of target bar<br>
make[3]: *** No rule to make target `foo&#39;, needed by `CMakeFiles/bar&#39;. &nbsp;Stop.<br>
make[2]: *** [CMakeFiles/bar.dir/all] Error 2<br>
make[1]: *** [CMakeFiles/bar.dir/rule] Error 2<br>
make: *** [bar] Error 2<br>
<br>
&nbsp;No rule for target &quot;foo&quot; that has been built already? I can&#39;t see what&#39;s wrong with my rules. Is it a bug?<br>
<br>
Thanks,<br>
Boris<br>
<br>
<br>
ADD_CUSTOM_TARGET(foo<br>
 &nbsp;COMMAND echo &quot;foo&quot;<br>
 &nbsp;COMMENT &quot;Fooing ..&quot;)<br>
<br>
ADD_CUSTOM_TARGET(bar<br>
 &nbsp;COMMAND echo &quot;bar&quot;<br>
 &nbsp;DEPENDS foo<br>
 &nbsp;COMMENT &quot;Bar-tender ..&quot;)<br>
<br>
_______________________________________________<br>
CMake mailing list<br>
<a href="mailto:CMake@cmake.org" target="_blank">CMake@cmake.org</a><br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br></div></div>