View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0015791 | CMake | CCMake | public | 2015-10-14 17:26 | 2016-03-07 09:12 | ||||
Reporter | Mikael Brudfors | ||||||||
Assigned To | Brad King | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | PC | OS | Windows | OS Version | 7 x64 | ||||
Product Version | |||||||||
Target Version | CMake 3.4 | Fixed in Version | CMake 3.4 | ||||||
Summary | 0015791: Error configuring 3D Slicer with CMake 3.4.0-rc1 | ||||||||
Description | When configuring 3D Slicer in CMake 3.4.0-rc1 I get the below error, which is not present when using earlier versions of CMake. CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/ExternalProject.cmake:1742 (message): error: git version 1.6.5 or later required for 'git submodule update --recursive': git_version='' Call Stack (most recent call first): C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/ExternalProject.cmake:2429 (_ep_add_download_command) CMake/ExternalProjectAddSource.cmake:77 (ExternalProject_Add) CMake/ExternalProjectAddSource.cmake:205 (ExternalProject_Add_Source) SuperBuild.cmake:174 (Slicer_Remote_Add) CMakeLists.txt:670 (include) | ||||||||
Steps To Reproduce | Set source to 3D Slicer source code, press configure. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0039605) Max Smolens (reporter) 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 (manager) 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 (manager) 2015-10-15 09:06 |
Meanwhile here is a fix for the error message: ExternalProject: Fix Git version report in error message https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4cd52dc5 [^] |
(0039611) Brad King (manager) 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 (manager) 2015-10-15 09:42 |
This should fix the main issue: ExternalProject: Always use CMake builtin FindGit https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c9e0173e [^] |
(0039613) Brad King (manager) 2015-10-15 09:42 |
I've queued this for merge to 'release' for 3.4.0-rc2. |
(0039614) Mikael Brudfors (reporter) 2015-10-15 09:53 |
Thank you! |
(0040619) Robert Maynard (manager) 2016-03-07 09:12 |
Closing resolved issues that have not been updated in more than 4 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2015-10-14 17:26 | Mikael Brudfors | New Issue | |
2015-10-14 18:22 | Max Smolens | Note Added: 0039605 | |
2015-10-15 08:30 | Brad King | Assigned To | => Brad King |
2015-10-15 08:30 | Brad King | Status | new => assigned |
2015-10-15 08:30 | Brad King | Target Version | => CMake 3.4 |
2015-10-15 08:52 | Brad King | Note Added: 0039609 | |
2015-10-15 09:06 | Brad King | Note Added: 0039610 | |
2015-10-15 09:10 | Brad King | Note Added: 0039611 | |
2015-10-15 09:42 | Brad King | Note Added: 0039612 | |
2015-10-15 09:42 | Brad King | Note Added: 0039613 | |
2015-10-15 09:42 | Brad King | Status | assigned => resolved |
2015-10-15 09:42 | Brad King | Resolution | open => fixed |
2015-10-15 09:42 | Brad King | Fixed in Version | => CMake 3.4 |
2015-10-15 09:53 | Mikael Brudfors | Note Added: 0039614 | |
2016-03-07 09:12 | Robert Maynard | Note Added: 0040619 | |
2016-03-07 09:12 | Robert Maynard | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |