Notes |
|
(0039605)
|
Max Smolens
|
2015-10-14 18:22
|
|
It looks like this regressed in the following commit:
https://github.com/Kitware/CMake/commit/b04c38159eb4db35770f541f7671fe33a3f32bc2 [^]
("ExternalProject: Use GIT_VERSION_STRING instead of custom method")
The custom method, _ep_get_git_version in ExternalProject.cmake, parses the version output differently than FindGit.cmake. Now, an error occurs because GIT_VERSION_STRING is never set.
The version output for the latest Git for Windows (https://git-for-windows.github.io/ [^]) is:
$ git --version
git version 2.6.1.windows.1
Note also that the 'message(FATAL_ERROR "error: git version 1.6.5 or later required...' line still uses ${git_version}. That should be updated to use ${GIT_VERSION_STRING}. |
|
|
(0039609)
|
Brad King
|
2015-10-15 08:52
|
|
Thanks for testing the release candidate and reporting this promptly.
Please try this patch:
diff --git a/Modules/FindGit.cmake b/Modules/FindGit.cmake
index 2c3e5fd..f1fabf8 100644
--- a/Modules/FindGit.cmake
+++ b/Modules/FindGit.cmake
@@ -68,8 +68,8 @@ if(GIT_EXECUTABLE)
OUTPUT_VARIABLE git_version
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
- if (git_version MATCHES "^git version [0-9]")
- string(REPLACE "git version " "" GIT_VERSION_STRING "${git_version}")
+ if (git_version MATCHES "^git version (.+)$")
+ set(GIT_VERSION_STRING "${CMAKE_MATCH_1}")
endif()
unset(git_version)
endif() |
|
|
(0039610)
|
Brad King
|
2015-10-15 09:06
|
|
|
|
(0039611)
|
Brad King
|
2015-10-15 09:10
|
|
Re 0015791:0039609: Actually the old code parses the "git version 2.6.1.windows.1" just fine too. The problem is that Slicer has its own FindGit that is hiding CMake's and does not set GIT_VERSION_STRING at all. Our ExternalProject module needs to be taught to tolerate this. |
|
|
(0039612)
|
Brad King
|
2015-10-15 09:42
|
|
|
|
(0039613)
|
Brad King
|
2015-10-15 09:42
|
|
I've queued this for merge to 'release' for 3.4.0-rc2.
|
|
|
(0039614)
|
Mikael Brudfors
|
2015-10-15 09:53
|
|
|
|
(0040619)
|
Robert Maynard
|
2016-03-07 09:12
|
|
Closing resolved issues that have not been updated in more than 4 months. |
|