<div class="gmail_quote">On Thu, Dec 17, 2009 at 10:53 AM, Michael Wild <span dir="ltr">&lt;<a href="mailto:themiwi@gmail.com">themiwi@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5"><br>
On 17. Dec, 2009, at 15:01 , David Cole wrote:<br>
<br>
&gt; On Thu, Dec 17, 2009 at 3:20 AM, Michael Wild &lt;<a href="mailto:themiwi@gmail.com">themiwi@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; On 16. Dec, 2009, at 20:35 , Michael Jackson wrote:<br>
&gt;&gt;<br>
&gt;&gt;&gt; I am intrigued by the &quot;ExternalProject&quot; feature of CMake 2.8. One<br>
&gt;&gt; question that I have after reading through the Oct 09 &quot;Kitware Source&quot; is<br>
&gt;&gt; this. If I do a &quot;make clean&quot; or &quot;rebuild&quot; are all the &quot;ExternalProjects&quot;<br>
&gt;&gt; also cleaned/rebuilt? I could make an argument both ways but I was curious<br>
&gt;&gt; what the default was?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; One of my projects depends on HDF5, Tiff, Expat and Boost (And Qt<br>
&gt;&gt; Eventually). Writing directions to get everything downloaded and built is<br>
&gt;&gt; getting to be a pain. Would be simpler to have all that done for the user.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Thanks for any comments<br>
&gt;&gt;&gt; _________________________________________________________<br>
&gt;&gt;&gt; Mike Jackson                  <a href="mailto:mike.jackson@bluequartz.net">mike.jackson@bluequartz.net</a><br>
&gt;&gt;&gt; BlueQuartz Software                    <a href="http://www.bluequartz.net" target="_blank">www.bluequartz.net</a><br>
&gt;&gt;&gt; Principal Software Engineer                  Dayton, Ohio<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; &quot;make clean&quot; behaves a bit strange for me... It seems to remove some of the<br>
&gt;&gt; stamp files, but does not actually perform a &quot;clean&quot; on the external<br>
&gt;&gt; project, or wipe the extracted sources. For me, this is a bit of a problem,<br>
&gt;&gt; since the PATCH_COMMAND will try to re-apply a patch, which of course will<br>
&gt;&gt; fail. Not sure how to teach CMake to not re-patch a source tree... Perhaps<br>
&gt;&gt; wrap the whole thing in a apply_patch.cmake script which creates its own<br>
&gt;&gt; stamp in the external source tree and only applies the patch if that stamp<br>
&gt;&gt; does not exist...<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt; Michael Wild&#39;s observations are correct. The &quot;make clean&quot; of the outer<br>
&gt; project is going to wipe all the stamp files causing all of the steps to<br>
&gt; re-run again, including downloads and checkouts.<br>
&gt;<br>
&gt; Since the patch command is empty by default and &#39;patch&#39; is not readily<br>
&gt; available on Windows, the patching stuff is less well tested than the rest<br>
&gt; of the steps.<br>
&gt;<br>
&gt; I guess I would be inclined to say that an outer/main-project &quot;make clean&quot;<br>
&gt; ought to default to cleaning the inner/nested/external projects as well...<br>
&gt; but it&#39;s not clear to me that there&#39;s a reasonable way to implement that<br>
&gt; quickly and easily. It&#39;s certainly worthy of a feature request and some<br>
&gt; discussion. And whatever the default behavior is, it should probably be<br>
&gt; controllable by one or more new arguments to the ExternalProject_Add<br>
&gt; function.<br>
&gt;<br>
&gt; Let me know if you have further ideas and suggestions.<br>
&gt;<br>
&gt;<br>
&gt; Thanks,<br>
&gt; David Cole<br>
<br>
<br>
</div></div>Also, should a &quot;make clean&quot; really trigger a re-download? What I would like to have is a MD5SUM option to ExternalProject_Add. Currently I&#39;m implementing this manually with a custom sub-step, but there&#39;s no reason it shouldn&#39;t be in CMake, because it natively implements -E md5sum.</blockquote>
<div><br></div><div><br></div><div>The MD5SUM option is a good idea that we have considered. I&#39;m almost certain md5 (or something like it) will appear in a future implementation of ExternalProject_Add.</div><div><br></div>
<div>Ideally, I think &quot;make clean&quot; should destroy all created build products. And in the case of ExternalProject_Add, the downloaded source is a &quot;build product.&quot; I understand why you would not want to re-download the source... You could put a *.tar.gz in your source tree and reference it directly there. You might not want to do that, either, though.</div>
<div><br></div><div>Thanks for the discussion.</div><div><br></div></div>