diff options
author | Brad King <brad.king@kitware.com> | 2020-07-27 14:44:54 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-07-27 14:46:35 (GMT) |
commit | c186a4335531c5ef1572917c113f7b49400b7c00 (patch) | |
tree | f391be097e5044199d8e1df9b80d0f7e4eb236ec /Modules | |
parent | c144eb5fd9c5f98478007017093049d5e94ac1d0 (diff) | |
parent | 8dbefc3ca6ab7043efb85bcfb6b53aa22c31b1df (diff) | |
download | CMake-c186a4335531c5ef1572917c113f7b49400b7c00.zip CMake-c186a4335531c5ef1572917c113f7b49400b7c00.tar.gz CMake-c186a4335531c5ef1572917c113f7b49400b7c00.tar.bz2 |
Merge topic 'externalproject-download-git-2.20-fix'
8dbefc3ca6 ExternalProject: omit --no-checkout from git clone when using git 2.20.x.
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5054
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/ExternalProject.cmake | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index 3a47090..aecc00b 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -1124,7 +1124,11 @@ 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 "--no-checkout") + if(GIT_VERSION_STRING VERSION_LESS 2.20 OR 2.21 VERSION_LESS_EQUAL GIT_VERSION_STRING) + set(git_clone_options "--no-checkout") + else() + set(git_clone_options) + endif() if(git_shallow) if(NOT GIT_VERSION_STRING VERSION_LESS 1.7.10) list(APPEND git_clone_options "--depth 1 --no-single-branch") |