summaryrefslogtreecommitdiffstats
path: root/Modules/ExternalProject.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-10-20 12:51:18 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-10-20 12:51:18 (GMT)
commitfc7ecd6b0570d91a31221203e4bbaf7e48006662 (patch)
treee0479810a270236ce9dddecf37d7af4e6f5620a1 /Modules/ExternalProject.cmake
parent72dac5365e97f2223037e6d3c37de78328883f32 (diff)
parente89fbfaf6626b0693cc597ce4e705d87b8faf996 (diff)
downloadCMake-fc7ecd6b0570d91a31221203e4bbaf7e48006662.zip
CMake-fc7ecd6b0570d91a31221203e4bbaf7e48006662.tar.gz
CMake-fc7ecd6b0570d91a31221203e4bbaf7e48006662.tar.bz2
Merge topic 'external-project-clone-progress'
e89fbfaf ExternalProject: support GIT_PROGRESS argument 64aa29b7 ExternalProject: fix typo
Diffstat (limited to 'Modules/ExternalProject.cmake')
-rw-r--r--Modules/ExternalProject.cmake17
1 files changed, 14 insertions, 3 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 4d702c8..1e0be09 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -65,9 +65,14 @@ Create custom targets to build projects in external trees
``GIT_SUBMODULES <module>...``
Git submodules that shall be updated, all if empty
``GIT_SHALLOW 1``
- Tell Git to clone with ``--depth 1``. Use when ``GIT_TAG`` is not
+ Tell Git to clone with ``--depth 1``. Use when ``GIT_TAG`` is not
specified or when it names a branch in order to download only the
tip of the branch without the rest of its history.
+ ``GIT_PROGRESS 1``
+ Tell Git to clone with ``--progress``. For large projects, the clone step
+ does not output anything which can make the build appear to have stalled.
+ This option forces Git to output progress information during the clone step
+ so that forward progress is indicated.
``HG_REPOSITORY <url>``
URL of mercurial repo
``HG_TAG <tag>``
@@ -509,7 +514,7 @@ define_property(DIRECTORY PROPERTY "EP_UPDATE_DISCONNECTED" INHERITED
"ExternalProject module."
)
-function(_ep_write_gitclone_script script_filename source_dir git_EXECUTABLE git_repository git_tag git_remote_name git_submodules git_shallow src_name work_dir gitclone_infofile gitclone_stampfile tls_verify)
+function(_ep_write_gitclone_script script_filename source_dir git_EXECUTABLE git_repository git_tag git_remote_name git_submodules git_shallow git_progress src_name work_dir gitclone_infofile gitclone_stampfile tls_verify)
if(NOT GIT_VERSION_STRING VERSION_LESS 1.7.10)
set(git_clone_shallow_options "--depth 1 --no-single-branch")
else()
@@ -555,6 +560,11 @@ if(git_shallow)
list(APPEND git_clone_options ${git_clone_shallow_options})
endif()
+set(git_progress \"${git_progress}\")
+if(git_progress)
+ list(APPEND git_clone_options --progress)
+endif()
+
# try the clone 3 times incase there is an odd git clone issue
set(error_code 1)
set(number_of_tries 0)
@@ -1801,6 +1811,7 @@ function(_ep_add_download_command name)
set(tls_verify "${CMAKE_TLS_VERIFY}")
endif()
get_property(git_shallow TARGET ${name} PROPERTY _EP_GIT_SHALLOW)
+ get_property(git_progress TARGET ${name} PROPERTY _EP_GIT_PROGRESS)
# For the download step, and the git clone operation, only the repository
# should be recorded in a configured RepositoryInfo file. If the repo
@@ -1825,7 +1836,7 @@ function(_ep_add_download_command name)
# The script will delete the source directory and then call git clone.
#
_ep_write_gitclone_script(${tmp_dir}/${name}-gitclone.cmake ${source_dir}
- ${GIT_EXECUTABLE} ${git_repository} ${git_tag} ${git_remote_name} "${git_submodules}" "${git_shallow}" ${src_name} ${work_dir}
+ ${GIT_EXECUTABLE} ${git_repository} ${git_tag} ${git_remote_name} "${git_submodules}" "${git_shallow}" "${git_progress}" ${src_name} ${work_dir}
${stamp_dir}/${name}-gitinfo.txt ${stamp_dir}/${name}-gitclone-lastrun.txt "${tls_verify}"
)
set(comment "Performing download step (git clone) for '${name}'")