summaryrefslogtreecommitdiffstats
path: root/Tests/ExternalProject
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-04-27 12:47:32 (GMT)
committerBrad King <brad.king@kitware.com>2016-04-27 14:58:07 (GMT)
commit7db9f3f294126e5e02d172e54c83a8ac90ed23a3 (patch)
tree9697cc140e1cbcf5067dd82f59283ef14ad65c39 /Tests/ExternalProject
parentb8a8dfec3688f1dc44f95528a65135fc76511c7b (diff)
downloadCMake-7db9f3f294126e5e02d172e54c83a8ac90ed23a3.zip
CMake-7db9f3f294126e5e02d172e54c83a8ac90ed23a3.tar.gz
CMake-7db9f3f294126e5e02d172e54c83a8ac90ed23a3.tar.bz2
ExternalProject: Add option to perform a shallow Git clone (#15291)
Inspired-by: Ilya Kulakov <kulakov.ilya@gmail.com>
Diffstat (limited to 'Tests/ExternalProject')
-rw-r--r--Tests/ExternalProject/CMakeLists.txt17
1 files changed, 17 insertions, 0 deletions
diff --git a/Tests/ExternalProject/CMakeLists.txt b/Tests/ExternalProject/CMakeLists.txt
index b5041c7..ca6462d 100644
--- a/Tests/ExternalProject/CMakeLists.txt
+++ b/Tests/ExternalProject/CMakeLists.txt
@@ -349,6 +349,20 @@ if(do_git_tests)
)
set_property(TARGET ${proj} PROPERTY FOLDER "GIT")
+ # Live git / master (no GIT_TAG), but shallow
+ #
+ set(proj TutorialStep1-GIT-shallow-master)
+ ExternalProject_Add(${proj}
+ GIT_REPOSITORY "${local_git_repo}"
+ GIT_SHALLOW 1
+ CMAKE_GENERATOR "${CMAKE_GENERATOR}"
+ CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
+ INSTALL_COMMAND ""
+ DEPENDS "SetupLocalGITRepository"
+ LOG_UPDATE 1
+ )
+ set_property(TARGET ${proj} PROPERTY FOLDER "GIT")
+
# git by explicit branch/tag with empty submodule list
#
set(proj TutorialStep1-GIT-bytag-withsubmodules)
@@ -543,6 +557,9 @@ if(do_git_tests)
add_test(TutorialStep1-GIT-bytag
"${binary_base}/TutorialStep1-GIT-bytag/Tutorial" 99)
+ add_test(TutorialStep1-GIT-shallow-master
+ "${binary_base}/TutorialStep1-GIT-shallow-master/Tutorial" 98)
+
add_test(TutorialStep1-GIT-master
"${binary_base}/TutorialStep1-GIT-master/Tutorial" 98)
endif()