[Cmake-commits] [cmake-commits] king committed ExternalProject.cmake 1.3 1.4
cmake-commits at cmake.org
cmake-commits at cmake.org
Mon Jul 13 10:46:38 EDT 2009
Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv30323/Modules
Modified Files:
ExternalProject.cmake
Log Message:
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.
Index: ExternalProject.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/ExternalProject.cmake,v
retrieving revision 1.3
retrieving revision 1.4
diff -C 2 -d -r1.3 -r1.4
*** ExternalProject.cmake 2 Jul 2009 21:38:30 -0000 1.3
--- ExternalProject.cmake 13 Jul 2009 14:46:32 -0000 1.4
***************
*** 513,518 ****
if("${url}" MATCHES "^[a-z]+://")
# TODO: Should download and extraction be different steps?
! string(REGEX MATCH "\\.(tar|tgz|tar\\.gz)" ext "${url}")
! set(file ${download_dir}/${name}${ext})
set(cmd ${CMAKE_COMMAND} -Dremote=${url} -Dlocal=${file} -P ${CMAKE_ROOT}/Modules/DownloadFile.cmake
COMMAND)
--- 513,521 ----
if("${url}" MATCHES "^[a-z]+://")
# TODO: Should download and extraction be different steps?
! string(REGEX MATCH "[^/]*$" fname "${url}")
! if(NOT "${fname}" MATCHES "\\.(tar|tgz|tar\\.gz)$")
! message(FATAL_ERROR "Could not extract tarball filename from url:\n ${url}")
! endif()
! set(file ${download_dir}/${fname})
set(cmd ${CMAKE_COMMAND} -Dremote=${url} -Dlocal=${file} -P ${CMAKE_ROOT}/Modules/DownloadFile.cmake
COMMAND)
More information about the Cmake-commits
mailing list