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

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

From
RDRobert Dailey <rcdailey.lists@gmail.com>
Date
Feb 20, 2018, 16:28 UTC
Message-ID
<CAHd499A+TT4zWPvW84B8XpmCdvoJCnSOZxY98MKZUO3h7cwo0g@mail.gmail.com>
In-Reply-To
<CAG6xkCa_nKtzhJJq=v7gazWe+8FnN3mz1vDftzZw2WUFqJ1bzw@mail.gmail.com>
On Thu, Jan 25, 2018 at 6:21 PM, Isaac Hier <isaachier@gmail.com> wrote:
Show 24 quoted lines
> Hi Jeff,
>
> I have been looking at the build generator, which looks promising, but
> I have one concern. Assuming I can generate a CMakeLists.txt that
> appropriately updates the library sources, etc. how do you suggest I
> handle new portability macros? For example, assume someone adds a
> macro HAVE_X to indicate the availability of some platform-specific
> function x. In the current Makefile, a comment would be added to the
> top indicating when HAVE_X or NO_X should be set, and that option
> would toggle the HAVE_X C macro. But CMake can test for the
> availability of x, which is one of the main motives for adding a CMake
> build. The current build generator uses the output of make, so all it
> would know is whether or not HAVE_X is defined on the platform that
> ran the Makefile, but not the entire list of platform that git
> supports.
>
> Bottom line: should I add the portability tests as they are now,
> without accounting for future portability macros? One good alternative
> might be to suggest the authors of new portability macros include a
> small sample C program to test it. That would allow me to easily patch
> the CMake tests whenever that came up. In a best case scenario, a
> practice could be established to write the test in a specific
> directory with a certain name so that I could automatically update the
> CMake tests from the build generator.
Isaac,

I'm very happy that you have started support for CMake. I have a lot of experience with it. I'd love to help contribute. Do you have a fork on github where this code is? I'd have to figure out how to apply a patch from email, I haven't done it before. I think the goal should be to replace the existing build system (this can be a transition that happens slowly). I've been in situations where multiple build systems are supported in parallel, worst case because of split personal preferences on a project. That is more counterproductive than asking the team to just compromise and take the initial hit on learning curve. Ultimately that's up to the Git community, but that would be my recommendation. But I think making CMake as complete as possible will help build that confidence and trust. I can completely understand the complexities and concerns they have.

Previous: Jeff HostetlerNext: Isaac Hier
Message 17 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.