<div class="gmail_quote">On Mon, Mar 28, 2011 at 10:48 AM, Rolf Eike Beer <span dir="ltr"><<a href="mailto:eike@sf-mail.de">eike@sf-mail.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">> I came up with this simple diff which makes everything work smoothly for<br>
> me:<br>
<br>
</div>This also works for me and should properly detect if the dependency is<br>
itself an external target or not:<br>
<div class="im"><br>
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake<br>
</div>index 3de6b7e..90b23ce 100644<br>
<div class="im">--- a/Modules/ExternalProject.cmake<br>
+++ b/Modules/ExternalProject.cmake<br>
</div>@@ -1261,8 +1261,14 @@ function(_ep_add_configure_command name)<br>
<div class="im"> set(file_deps)<br>
get_property(deps TARGET ${name} PROPERTY _EP_DEPENDS)<br>
foreach(dep IN LISTS deps)<br>
</div>+ # Find out if this dependency is itself an external target or not.<br>
+ # If it doesn't have _EP_STAMP_DIR we assume it's a normal target.<br>
<div class="im"> get_property(dep_stamp_dir TARGET ${dep} PROPERTY _EP_STAMP_DIR)<br>
- list(APPEND file_deps ${dep_stamp_dir}${cfgdir}/${dep}-done)<br>
</div>+ if(dep_stamp_dir)<br>
<div class="im">+ list(APPEND file_deps ${dep_stamp_dir}${cfgdir}/${dep}-done)<br>
</div>+ else(dep_stamp_dir)<br>
+ list(APPEND file_deps ${dep})<br>
+ endif(dep_stamp_dir)<br>
<div class="im"> endforeach()<br>
<br>
get_property(cmd_set TARGET ${name} PROPERTY _EP_CONFIGURE_COMMAND SET)<br>
<br>
</div><div><div></div><div class="h5">Eike<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br><div><br></div><div>I am not sure I like this patch, or not. I'm on the fence.</div><div><br></div><div>I would recommend just using:</div><div><br></div><div> ExternalProject_Add(xyz ...)</div>
<div> add_dependencies(xyz mylib)</div><div><br></div><div>to add non-ExternalProject dependencies. Just to make it clear that the dependencies are target-level dependencies and not file dependencies.</div><div><br></div>