microsoft / git

A fork of Git containing Microsoft-specific patches.
http://git-scm.com/
Other
765 stars 92 forks source link

"vfs" in git version string breaks cmake git version parser #309

Open alexfeinman opened 3 years ago

alexfeinman commented 3 years ago

Setup

64-bit git on Ubuntu 18.04 64 bit

$ git --version --build-options

git version 2.29.0.vfs.0.0
cpu: x86_64
built from commit: 3c7b47771c6afc8e8093f066fe29ff80fcf0b8ac
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
$ cmd.exe /c ver

Ubuntu Linux - using this git build with Scalar
# One of the following:
> type "C:\Program Files\Git\etc\install-options.txt"
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
$ cat /etc/install-options.txt

N/A

*

Details

bash

git clone 
https://github.com/leggedrobotics/SimBenchmark
cd SimBenchmark/lib
mkdir build
cd build
cmake ..

cmake run successfully completes

CMake Error at /usr/share/cmake-3.19/Modules/ExternalProject.cmake:2449 (message): error: git version 1.6.5 or later required for --recursive flag with 'git submodule ...': GIT_VERSION_STRING=''

https://github.com/leggedrobotics/SimBenchmark

derrickstolee commented 3 years ago

Hi @alexfeinman, I imagine that this also fails with Git for Windows, which includes windows in this spot? Or is there special logic in CMake to handle that option?

In general, it would be preferable if CMake could update their version parsing to allow extra arbitrary data after the first three numbers, but I'm not sure how to make that happen.