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