diff options
author | Matt McCormick <matt.mccormick@kitware.com> | 2012-11-09 13:45:52 +0000 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-11-13 13:35:09 -0500 |
commit | a41d3a40bea01cd4e45579832ac131a0329afc1d (patch) | |
tree | 1c61d5a4ea506ed1822297ef4a7358532f0c45f8 | |
parent | de760c1fa39ba6d052344dc1052b4b47086998ae (diff) | |
download | cmake-a41d3a40bea01cd4e45579832ac131a0329afc1d.tar.gz |
ExternalProjectUpdateTest: Only support Git 1.6.5 and greater.
-rw-r--r-- | Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake b/Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake index 080dd4a054..5a6af579e4 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 |