git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC PATCH 0/1] Implement CMake build

From
JHJeff Hostetler <git@jeffhostetler.com>
Date
Jan 24, 2018, 19:36 UTC
Message-ID
<675fa58d-bff3-d7e4-5fac-ecf1401932f4@jeffhostetler.com>
In-Reply-To
<20180123001648.24260-1-isaachier@gmail.com>
On 1/22/2018 7:16 PM, Isaac Hier wrote:
Show 10 quoted lines
> This patch adds a mostly complete (aside from building tests, documentation,
> installation, etc.) CMake build to the git project. I am not sure how much
> interest there is in a CMake build, so please send me feedback one way or
> another. Personally, I believe CMake will help with Windows builds and is
> somewhat easier to read than a Makefile. I considered, adding this to the
> contrib directory, but CMakeLists.txt almost always reside in the original
> directories, and I'm not sure how wise it would be to do otherwise. If you are
> interested in a CMake build, I would be more than happy to finish up the work
> here. Decided to wait until I discussed the issue here to finish the final parts
> of the build.

On Windows, we use "bash" and "make" from the Git-for-Windows SDK installation (which gives us a bash shell and most of the usual Unix command line tools) and the main "Makefile". We do need a special section in the "config.mak.uname" file to set some platform compiler options and etc., but that is small enough.

Johannes and I recently added a few new options to let Windows build Git from the command line with either GCC or MSVC and to synthesize MSVS solution (.sln) and project (.vcxproj) files to allow you to work with the full MSVS IDE and full intellisense. And if necessary download and build third-party libraries not normally present on a Windows machine. Most of this work is Windows specific and may not yet be upstream. See GfW [1] and VCPKG [2].

The synthesized solution and project files are automatically generated, so we do not have to separately track changes in the Makefile to the various file lists. These should be treated as read-only and re-generated in response to changes in the Makefile. Using the solution/project files, we can completely build Git in the IDE or a command prompt and without the SDK. This further simplifies things for Windows developers.

So given that, I don't see a need to replace the main Makefile on Windows.

Sorry, Jeff

[1] https://github.com/git-for-windows/git [2] https://github.com/Microsoft/vcpkg

Previous: Isaac HierNext: Isaac Hier
Message 11 of 18 in “Implement CMake build”
  1. 0/1 Implement CMake buildIsaac Hier, Jan 23, 2018
  2. 1/1 Implement CMake buildIsaac Hier, Jan 23, 2018
  3. Isaac HierJan 24, 2018
  4. Jacob KellerJan 24, 2018
  5. Junio C HamanoJan 24, 2018
  6. Ævar Arnfjörð BjarmasonJan 24, 2018
  7. Stephan BeyerJan 24, 2018
  8. Isaac HierJan 24, 2018
  9. Stephan BeyerJan 24, 2018
  10. Isaac HierJan 25, 2018
  11. Jeff HostetlerJan 24, 2018
  12. Isaac HierJan 24, 2018
  13. Jeff HostetlerJan 24, 2018
  14. Isaac HierJan 24, 2018
  15. Isaac HierJan 26, 2018
  16. Jeff HostetlerJan 26, 2018
  17. Robert DaileyFeb 20, 2018
  18. Isaac HierFeb 23, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.