On Thu, Dec 17, 2009 at 3:20 AM, Michael Wild <span dir="ltr">&lt;<a href="mailto:themiwi@gmail.com">themiwi@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
On 16. Dec, 2009, at 20:35 , Michael Jackson wrote:<br>
<br>
&gt; I am intrigued by the &quot;ExternalProject&quot; feature of CMake 2.8. One question that I have after reading through the Oct 09 &quot;Kitware Source&quot; is this. If I do a &quot;make clean&quot; or &quot;rebuild&quot; are all the &quot;ExternalProjects&quot; also cleaned/rebuilt? I could make an argument both ways but I was curious what the default was?<br>

&gt;<br>
&gt;  One of my projects depends on HDF5, Tiff, Expat and Boost (And Qt Eventually). Writing directions to get everything downloaded and built is getting to be a pain. Would be simpler to have all that done for the user.<br>

&gt;<br>
&gt; Thanks for any comments<br>
&gt; _________________________________________________________<br>
&gt; Mike Jackson                  <a href="mailto:mike.jackson@bluequartz.net">mike.jackson@bluequartz.net</a><br>
&gt; BlueQuartz Software                    <a href="http://www.bluequartz.net" target="_blank">www.bluequartz.net</a><br>
&gt; Principal Software Engineer                  Dayton, Ohio<br>
&gt;<br>
<br>
</div>&quot;make clean&quot; behaves a bit strange for me... It seems to remove some of the stamp files, but does not actually perform a &quot;clean&quot; on the external project, or wipe the extracted sources. For me, this is a bit of a problem, since the PATCH_COMMAND will try to re-apply a patch, which of course will fail. Not sure how to teach CMake to not re-patch a source tree... Perhaps wrap the whole thing in a apply_patch.cmake script which creates its own stamp in the external source tree and only applies the patch if that stamp does not exist...<br>
<font class="Apple-style-span" color="#888888"><br></font></blockquote><div><br></div><div>Michael Wild&#39;s observations are correct. The &quot;make clean&quot; of the outer project is going to wipe all the stamp files causing all of the steps to re-run again, including downloads and checkouts.</div>
<div><br></div><div>Since the patch command is empty by default and &#39;patch&#39; is not readily available on Windows, the patching stuff is less well tested than the rest of the steps.</div><div><br></div><div>I guess I would be inclined to say that an outer/main-project &quot;make clean&quot; ought to default to cleaning the inner/nested/external projects as well... but it&#39;s not clear to me that there&#39;s a reasonable way to implement that quickly and easily. It&#39;s certainly worthy of a feature request and some discussion. And whatever the default behavior is, it should probably be controllable by one or more new arguments to the ExternalProject_Add function.</div>
<div><br></div><div>Let me know if you have further ideas and suggestions.</div><div><br></div><div><br></div><div>Thanks,</div><div>David Cole</div><div><br></div></div>