cmake: support for building git on windows with mingw
authorSibi Siddharthan <redacted>
Fri, 26 Jun 2020 16:11:36 +0000 (16:11 +0000)
committerJunio C Hamano <redacted>
Fri, 26 Jun 2020 17:08:46 +0000 (10:08 -0700)
commitf7adba41820bbcfb86349c2ebc529f626d2313e3
treeca6edb64e8db97040e03ae2c435dee2b00315099
parent7f5397a07c6c43a522e3802180a4d8cf1c76b59b
cmake: support for building git on windows with mingw

This patch facilitates building git on Windows with CMake using MinGW

NOTE: The funtions unsetenv and hstrerror are not checked in Windows
builds.
Reasons
NO_UNSETENV is not compatible with Windows builds.
lines 262-264 compat/mingw.h

compat/mingw.h(line 25) provides a definition of hstrerror which
conflicts with the definition provided in
git-compat-util.h(lines 733-736).

To use CMake on Windows with MinGW do this:
cmake `relative-path-to-srcdir` -G "MinGW Makefiles"

Signed-off-by: Sibi Siddharthan <redacted>
Signed-off-by: Junio C Hamano <redacted>
contrib/buildsystems/CMakeLists.txt
git clone https://git.99rst.org/PROJECT