[CMake] ExternalProject feature regenerating the configure script

Alan W. Irwin irwin at beluga.phys.uvic.ca
Tue Jul 30 10:55:34 EDT 2013


On 2013-07-30 10:29-0000 David Cole wrote:

>> 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...) 😊

Hi Dave:

The never-ending debate about fixes versus workarounds starts up
again.  :-)

Here is my opinion.  I don't use this ExternalProject feature myself
where if the "URL" is actually a source directory which this module
copies to the correct place.  So I suspect this is a little-used
feature.  But since it is there, I think this feature should work
properly, i.e., preserve time stamps in the copied source tree.
Workarounds (like avoiding using this feature which is what you are
advocating) are a great individual tactic to get work done so Ashok
may decide to take that approach. However, workarounds by definition
are only useful for those "in the know" so if he is kind enough to put
together a proper fix for the ExternalProject module along the lines I
have suggested (which would not, by the way, impact on any other
aspect of CMake) and assuming the fix is an obvious no-brainer that
CMake accepts, that is a positive for everybody in the future who
would otherwise be tripping over this issue.  So I hope he goes for
the fix rather than the workaround, but that is obviously up to him.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the CMake mailing list