summaryrefslogtreecommitdiffstats
path: root/Modules/ExternalProject.cmake
diff options
context:
space:
mode:
authorTetragramm <gaussgun+github@gmail.com>2019-07-29 23:17:49 (GMT)
committerBrad King <brad.king@kitware.com>2019-07-30 15:45:33 (GMT)
commit627fc5b44f7c5fab2d6bc81ae3a0d9b06cb9f3bf (patch)
treef5de01fbd5469f1339522e57ad7c7212b404b344 /Modules/ExternalProject.cmake
parentf6df9c2565ed00ec6f57c32a36dd451c60917f97 (diff)
downloadCMake-627fc5b44f7c5fab2d6bc81ae3a0d9b06cb9f3bf.zip
CMake-627fc5b44f7c5fab2d6bc81ae3a0d9b06cb9f3bf.tar.gz
CMake-627fc5b44f7c5fab2d6bc81ae3a0d9b06cb9f3bf.tar.bz2
ExternalProject: Avoid unnecessary checkout on clone
The clone step checks out the cloned branch but is always followed by an explicit checkout of the desired `GIT_TAG`. Tell `git clone` not to check out.
Diffstat (limited to 'Modules/ExternalProject.cmake')
-rw-r--r--Modules/ExternalProject.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 14fc231..e55ed46 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -1079,7 +1079,7 @@ function(_ep_write_gitclone_script script_filename source_dir git_EXECUTABLE git
message(FATAL_ERROR "Tag for git checkout should not be empty.")
endif()
- set(git_clone_options)
+ set(git_clone_options "--no-checkout")
if(git_shallow)
if(NOT GIT_VERSION_STRING VERSION_LESS 1.7.10)
list(APPEND git_clone_options "--depth 1 --no-single-branch")