Commit Graph

76 Commits

Author SHA1 Message Date
Brad King 79f01660c9 Merge branch 'more-formats-in-ExternalProject' 2010-06-07 14:22:26 -04:00
Brad King 33b59ee8dd Merge branch 'use-rename-not-copy-ExternalProject' 2010-06-07 14:22:02 -04:00
Brad King 2bc82e07bd Merge branch 'ExternalProject-fixes' 2010-06-07 14:21:49 -04:00
David Cole 29383b4b85 Add FindGit module.
Use it from ExternalProject and the ExternalProject test's
CMakeLists file rather than having duplicate find_program calls.
Add logic so that we do not try to use *.cmd variants of git
programs when using the MSYS Makefiles generator. Should fix
the last remaining dashboard issue with the new ExternalProject
git support additions.

Also, correct minor problem regarding placement of the local git
repo during test execution. On clean builds, it was being placed
incorrectly because of the ../.. relative reference. Use an absolute
path to place the local git repo in the proper directory, and only
use the relative reference when referring to it.
2010-06-03 17:30:07 -04:00
David Cole 670e16af2d Add git support to ExternalProject.
Requires at least version 1.6.5 of a git client for
git submodule update --recursive use.
2010-06-02 16:28:04 -04:00
David Cole 2deba1b911 Add .zip and .tar.bz2 extraction to ExternalProject.
Add archives of these file types and add to the test
cases covered in the ExternalProject test.

Also add an "Example" directory in the Tests/ExternalProject
directory containing the canonical simplest example of
ExternalProject usage.
2010-05-31 14:30:22 -04:00
David Cole f67139ae6f Improve FILE(DOWNLOAD) and ExternalProject.
Improve FILE(DOWNLOAD ...):

- Add percent complete progress output to the FILE DOWNLOAD
  command. This progress output is off by default to
  preserve existing behavior. To turn it on, pass
  SHOW_PROGRESS as an argument.

- Add EXPECTED_MD5 argument. Verify that the downloaded
  file has the expected md5 sum after download is complete.

- Add documentation for SHOW_PROGRESS and EXPECTED_MD5.

  When the destination file exists already and has the
  expected md5 sum, then do not bother re-downloading
  the file. ("Short circuit" return.)

  Also, add a test that checks for the status output
  indicating that the short circuit behavior is actually
  occurring. Use a binary file for the test so that the
  md5 sum is guaranteed to be the same on all platforms
  regardless of "shifting text file line ending" issues.

Improve ExternalProject:

- Add argument URL_MD5.

- Add verify step that compares md5 sum of .tar.gz file
  before extracting it.

- Add md5 check to download step, too, to prevent
  unnecessary downloads.

- Emit a warning message when a file is not verified.
  Indicate that the file may be corrupt or that no
  checksum was specified.
2010-05-27 12:21:56 -04:00
David Cole f5e8ce522e Use RENAME, not COPY, to extract .tar.gz files.
Use ABSOLUTE file name for the RENAME operation.
  (Thanks to Marcus for figuring out that it doesn't
   work on Linux without the ABSOLUTE bit.)
2010-05-26 17:42:56 -04:00
David Cole ea6260cb18 Fix issue #10258: re-configure if args change.
Fixes issue http://public.kitware.com/Bug/view.php?id=10258
Also, fix complaint that DOWNLOAD_COMMAND cannot contain arguments
consisting entirely of upper case letters. It validly does when,
for example, you construct a custom cvs command line and the module
name is all upper case, like VTK.
2010-05-26 15:38:41 -04:00
David Cole 672d9ba78c Add svn user name and password to ExternalProject.
Thanks to JCFR for the leg work.
2010-05-26 14:50:19 -04:00
Alex Neundorf f99771ce0a -revert the previous unintended commit
Alex
2010-04-10 23:49:09 +02:00
Alex Neundorf 8d907e298b -no change, don't know why git wants to commit something
(I accidentially removed ExternalProject.cmake from git by doing
mv ExternalProject.cmake ExternalProject.cmake.save
git checkout master
which I hoped would basically do a revert as it does with svn and cvs, but it
deleted the file from git)

Alex
2010-04-10 23:49:09 +02:00
David Cole 490009c016 Fix issue #9764 - add TIMEOUT arg to ExternalProject_Add so that callers have explicit control over the amount of time they are willing to wait for a download step. Default to no timeout, which means just run download for however long it takes. 2009-12-11 15:04:55 -05:00
David Cole f95bc6b5ad Eliminate ExternalProject's use of CMAKE_CFG_INTDIR subdir for Makefile generators. It was causing problems with parallel make -j invocations. Keep it for multi-configuration build systems so that Debug and Release stamp files remain separate. 2009-09-30 16:22:36 -04:00
Brad King 3a666595c9 Convert CMake non-find modules to BSD License
This adds copyright/license notification blocks CMake's non-find
modules.  Most of the modules had no notices at all.  Some had notices
referring to the BSD license already.  This commit normalizes existing
notices and adds missing notices.
2009-09-28 11:46:51 -04:00
David Cole cba1dd59fd Better error message tells user possible ways to resolve the error. 2009-09-18 12:56:49 -04:00
David Cole 6149e8f7e8 Missed another CMAKE_CFG_INTDIR reference in the previously previous commit. 2009-09-08 17:28:49 -04:00
David Cole 883338584f Missed a CMAKE_CFG_INTDIR reference in the previous commit. 2009-09-08 16:11:19 -04:00
David Cole 002ae925c3 Use more verbose/descriptive names for the "public API" functions in the ExternalProject.cmake module. Follow the cmake function naming convention, using a ModuleFileName_ prefix. Locate stamp files under a CMAKE_CFG_INTDIR subdir of the stamp dir so that debug and release builds have separate stamp files for Visual Studio builds. If no CMAKE_GENERATOR argument is given to ExternalProject_Add, default to using the parent project's cmake generator. 2009-09-08 15:37:15 -04:00
David Cole 5624be360e Add test step to ExternalProject builds. Rename SVN_TAG to SVN_REVISION since it is a more accurate name. 2009-09-03 12:11:14 -04:00
David Cole 1171bcfc69 Add missing argument to _ep_write_downloadfile_script. 2009-08-26 06:52:43 -04:00
David Cole 0470a0c1ad Remove DownloadFile.cmake and UntarFile.cmake from the Modules directory. Put functionality directly into ExternalProject.cmake itself so that these modules do not end up in the upcoming release of CMake. 2009-08-19 12:19:12 -04:00
Brad King a03bb5a28f ENH: Check tarball filename in ep_add
This teaches the ExternalProject module to check the download URL file
name.  If it is not a tarball (.tar, .tgz, .tar.gz) it is an error
because UntarFile does not yet understand other archive formats.
2009-07-13 10:46:32 -04:00
David Cole 10f4e911f0 BUG: Allow arbitrary text in values for some keywords. (And avoid warning that the arbitrary text is an unknown keyword.) 2009-07-02 17:38:30 -04:00
David Cole 04fb177de1 BUG: cmd_set logic was missing from update and patch steps. Fix it so that UPDATE_COMMAND "" means "no update step even though this is a CVS/SVN repository..." 2009-07-02 13:17:55 -04:00
Brad King 031379abe6 ENH: New ExternalProject.cmake module interface
This creates new module ExternalProject.cmake to replace the prototype
AddExternalProject.cmake module.  The interface is more refined, more
flexible, and better documented than the prototype.

This also converts the ExternalProject test to use the new module.  The
old module will be removed (it was never in a CMake release) after
projects using it have been converted to the new module.
2009-06-24 15:03:26 -04:00