diff --git a/Tests/ExternalProject/CMakeLists.txt b/Tests/ExternalProject/CMakeLists.txt index 09b761919..4c93ef3e1 100644 --- a/Tests/ExternalProject/CMakeLists.txt +++ b/Tests/ExternalProject/CMakeLists.txt @@ -161,7 +161,7 @@ if(do_cvs_tests) SOURCE_DIR ${local_cvs_repo} URL ${CMAKE_CURRENT_SOURCE_DIR}/cvsrepo.tgz BUILD_COMMAND "" - CONFIGURE_COMMAND ${CVS_EXECUTABLE} --version + CONFIGURE_COMMAND "${CVS_EXECUTABLE}" --version INSTALL_COMMAND "" ) @@ -257,7 +257,7 @@ if(do_svn_tests) SOURCE_DIR ${local_svn_repo} URL ${CMAKE_CURRENT_SOURCE_DIR}/svnrepo.tgz BUILD_COMMAND "" - CONFIGURE_COMMAND ${Subversion_SVN_EXECUTABLE} --version + CONFIGURE_COMMAND "${Subversion_SVN_EXECUTABLE}" --version INSTALL_COMMAND "" ) @@ -304,6 +304,19 @@ 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() @@ -318,7 +331,7 @@ if(do_git_tests) SOURCE_DIR ${local_git_repo} URL ${CMAKE_CURRENT_SOURCE_DIR}/gitrepo.tgz BUILD_COMMAND "" - CONFIGURE_COMMAND ${git_EXECUTABLE} --version + CONFIGURE_COMMAND "${git_EXECUTABLE}" --version INSTALL_COMMAND "" )