summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-11-11 15:44:10 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-11-11 15:44:10 (GMT)
commit8715157c73b243d2e4f7a0dc83a3a91d780a7a0b (patch)
tree2497d0014738a873ccf79d7bc54c7a941cb950a5 /Tests
parent68a9fc1bca0dab0804d0ca411f933d8e9ec88093 (diff)
parent2be9d85af8caddb26936279a2ed9b226e97ea410 (diff)
downloadCMake-8715157c73b243d2e4f7a0dc83a3a91d780a7a0b.zip
CMake-8715157c73b243d2e4f7a0dc83a3a91d780a7a0b.tar.gz
CMake-8715157c73b243d2e4f7a0dc83a3a91d780a7a0b.tar.bz2
Merge topic 'ExternalProject-GIT_CONFIG'
2be9d85a ExternalProject: Allow passing config flags to git clone
Diffstat (limited to 'Tests')
-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 ca6462d..72c20eb 100644
--- a/Tests/ExternalProject/CMakeLists.txt
+++ b/Tests/ExternalProject/CMakeLists.txt
@@ -363,6 +363,23 @@ if(do_git_tests)
)
set_property(TARGET ${proj} PROPERTY FOLDER "GIT")
+ # Live git / master (no GIT_TAG), but git config flags
+ #
+ # The `git clone --config` parameter has been introduced in Git 1.7.7
+ if(NOT git_version VERSION_LESS 1.7.7)
+ set(proj TutorialStep1-GIT-config)
+ ExternalProject_Add(${proj}
+ GIT_REPOSITORY "${local_git_repo}"
+ GIT_CONFIG core.eol=lf core.autocrlf=input
+ 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")
+ endif()
+
# git by explicit branch/tag with empty submodule list
#
set(proj TutorialStep1-GIT-bytag-withsubmodules)