summaryrefslogtreecommitdiffstats
path: root/Tests/ExternalProject
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2010-05-27 16:21:56 (GMT)
committerDavid Cole <david.cole@kitware.com>2010-05-27 16:21:56 (GMT)
commitf67139ae6fdf964218a93e5506722a367e781c6f (patch)
tree2245faa382647a682ed2cfe41bc70331c706247e /Tests/ExternalProject
parent282a119e355f86e20cc04fabd98083de2799c0ea (diff)
downloadCMake-f67139ae6fdf964218a93e5506722a367e781c6f.zip
CMake-f67139ae6fdf964218a93e5506722a367e781c6f.tar.gz
CMake-f67139ae6fdf964218a93e5506722a367e781c6f.tar.bz2
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.
Diffstat (limited to 'Tests/ExternalProject')
-rw-r--r--Tests/ExternalProject/CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/Tests/ExternalProject/CMakeLists.txt b/Tests/ExternalProject/CMakeLists.txt
index f02f2f7..4ae04d3 100644
--- a/Tests/ExternalProject/CMakeLists.txt
+++ b/Tests/ExternalProject/CMakeLists.txt
@@ -65,7 +65,9 @@ ExternalProject_Add(${proj}
SVN_REPOSITORY ""
SVN_REVISION ""
TEST_COMMAND ""
+ TIMEOUT ""
URL ""
+ URL_MD5 ""
UPDATE_COMMAND ""
)
@@ -96,6 +98,7 @@ endif()
set(proj TutorialStep1-LocalTAR)
ExternalProject_Add(${proj}
URL "${CMAKE_CURRENT_SOURCE_DIR}/Step1.tar"
+ URL_MD5 a87c5b47c0201c09ddfe1d5738fdb1e3
LIST_SEPARATOR ::
PATCH_COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/Step1Patch.cmake
CMAKE_GENERATOR "${CMAKE_GENERATOR}"
@@ -107,6 +110,7 @@ ExternalProject_Add(${proj}
set(proj TutorialStep1-LocalNoDirTAR)
ExternalProject_Add(${proj}
URL "${CMAKE_CURRENT_SOURCE_DIR}/Step1NoDir.tar"
+ URL_MD5 d09e3d370c5c908fa035c30939ee438e
LIST_SEPARATOR @@
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -G ${CMAKE_GENERATOR} <SOURCE_DIR>
-DTEST_LIST:STRING=1@@2@@3
@@ -126,6 +130,7 @@ ExternalProject_Add_Step(${proj} mypatch
set(proj TutorialStep1-LocalTGZ)
ExternalProject_Add(${proj}
URL "${CMAKE_CURRENT_SOURCE_DIR}/Step1.tgz"
+ URL_MD5 38c648e817339c356f6be00eeed79bd0
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -G ${CMAKE_GENERATOR} <SOURCE_DIR>
INSTALL_COMMAND ""
)
@@ -133,6 +138,7 @@ ExternalProject_Add(${proj}
set(proj TutorialStep1-LocalNoDirTGZ)
ExternalProject_Add(${proj}
URL "${CMAKE_CURRENT_SOURCE_DIR}/Step1NoDir.tgz"
+ URL_MD5 0b8182edcecdf40bf1c9d71d7d259f78
CMAKE_GENERATOR "${CMAKE_GENERATOR}"
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
INSTALL_COMMAND ""
@@ -161,6 +167,7 @@ if(do_cvs_tests)
ExternalProject_Add(${proj}
SOURCE_DIR ${local_cvs_repo}
URL ${CMAKE_CURRENT_SOURCE_DIR}/cvsrepo.tgz
+ URL_MD5 55fc85825ffdd9ed2597123c68b79f7e
BUILD_COMMAND ""
CONFIGURE_COMMAND ${CVS_EXECUTABLE} --version
INSTALL_COMMAND ""
@@ -257,6 +264,7 @@ if(do_svn_tests)
ExternalProject_Add(${proj}
SOURCE_DIR ${local_svn_repo}
URL ${CMAKE_CURRENT_SOURCE_DIR}/svnrepo.tgz
+ URL_MD5 2f468be4ed1fa96377fca0cc830819c4
BUILD_COMMAND ""
CONFIGURE_COMMAND ${Subversion_SVN_EXECUTABLE} --version
INSTALL_COMMAND ""