[CMake] Re: ExternalProject feature regenerating the configure script

David Cole dlrdave at aol.com
Tue Jul 30 06:29:27 EDT 2013


> For now, one possibility to preserve the timestamps of the files is to
> replace that cmake -E copy_directory command 
> with a combination of the

> cmake -E tar cf ....
> cmake -E tar xf ....



Even easier than that would be to create the tarball you want, and then just pass it as the URL to ExternalProject_Add, either from a url on the internet, or a reference to a tarball in your source tree.


ExternalProject totally knows how to transform a .tar/.tar.gz file into a source directory...


You could also try simply using the directory in-place as the original if you specify:

  DOWNLOAD_COMMAND “”

  SOURCE_DIR “original directory”

instead of URL.



Always take the simplest approach that requires no changes to existing CMake if it’s possible (and not completely unreasonable...) 😊



HTH,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130730/909c3710/attachment-0001.htm>


More information about the CMake mailing list