FindGit: Add Git_VERSION

This deprecates the GIT_VERSION_STRING result variable.

Issue: #27088
Fixes: #26868
This commit is contained in:
Peter Kokot
2025-09-14 21:08:16 +02:00
parent dd06fad849
commit fe72a5dba2
10 changed files with 58 additions and 33 deletions

View File

@@ -56,9 +56,9 @@ set(do_git_tests 0)
if(GIT_EXECUTABLE)
set(do_git_tests 1)
message(STATUS "GIT_VERSION_STRING='${GIT_VERSION_STRING}'")
message(STATUS "Git_VERSION='${Git_VERSION}'")
if("${GIT_VERSION_STRING}" VERSION_LESS 1.6.5)
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()

View File

@@ -177,9 +177,9 @@ set(do_git_tests 0)
if(GIT_EXECUTABLE)
set(do_git_tests 1)
message(STATUS "GIT_VERSION_STRING='${GIT_VERSION_STRING}'")
message(STATUS "Git_VERSION='${Git_VERSION}'")
if("${GIT_VERSION_STRING}" VERSION_LESS 1.6.5)
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()