summaryrefslogtreecommitdiffstats
path: root/Tests/ExternalProjectUpdate
diff options
context:
space:
mode:
authorMatt McCormick <matt.mccormick@kitware.com>2012-11-09 13:45:52 (GMT)
committerBrad King <brad.king@kitware.com>2012-11-13 18:35:09 (GMT)
commita41d3a40bea01cd4e45579832ac131a0329afc1d (patch)
tree1c61d5a4ea506ed1822297ef4a7358532f0c45f8 /Tests/ExternalProjectUpdate
parentde760c1fa39ba6d052344dc1052b4b47086998ae (diff)
downloadCMake-a41d3a40bea01cd4e45579832ac131a0329afc1d.zip
CMake-a41d3a40bea01cd4e45579832ac131a0329afc1d.tar.gz
CMake-a41d3a40bea01cd4e45579832ac131a0329afc1d.tar.bz2
ExternalProjectUpdateTest: Only support Git 1.6.5 and greater.
Diffstat (limited to 'Tests/ExternalProjectUpdate')
-rw-r--r--Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake18
1 files changed, 18 insertions, 0 deletions
diff --git a/Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake b/Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake
index 080dd4a..5a6af57 100644
--- a/Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake
+++ b/Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake
@@ -61,7 +61,25 @@ was expected."
endmacro()
find_package(Git)
+set(do_git_tests 0)
if(GIT_EXECUTABLE)
+ set(do_git_tests 1)
+
+ execute_process(
+ COMMAND "${GIT_EXECUTABLE}" --version
+ OUTPUT_VARIABLE ov
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+ string(REGEX REPLACE "^git version (.+)$" "\\1" git_version "${ov}")
+ message(STATUS "git_version='${git_version}'")
+
+ if(git_version VERSION_LESS 1.6.5)
+ message(STATUS "No ExternalProject git tests with git client less than version 1.6.5")
+ set(do_git_tests 0)
+ endif()
+endif()
+
+if(do_git_tests)
check_a_tag(origin/master 5842b503ba4113976d9bb28d57b5aee1ad2736b7 1)
check_a_tag(tag1 d1970730310fe8bc07e73f15dc570071f9f9654a 1)
# With the Git UPDATE_COMMAND performance patch, this will not required a