git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Isaac Hier <isaachier@gmail.com>
To: Jeff Hostetler <git@jeffhostetler.com>
Cc: "Junio C Hamano" <gitster@pobox.com>,
	git@vger.kernel.org, "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: Re: [RFC PATCH 0/1] Implement CMake build
Date: Thu, 25 Jan 2018 19:21:24 -0500	[thread overview]
Message-ID: <CAG6xkCa_nKtzhJJq=v7gazWe+8FnN3mz1vDftzZw2WUFqJ1bzw@mail.gmail.com> (raw)
In-Reply-To: <ee5185b1-7820-b2ac-1bde-da1c761fa594@jeffhostetler.com>

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.

Thanks for the help,

Isaac

On Wed, Jan 24, 2018 at 4:00 PM, Jeff Hostetler <git@jeffhostetler.com> wrote:
>
>
> On 1/24/2018 2:59 PM, Isaac Hier wrote:
>>
>> Jeff, no worries, fair enough. I know https://github.com/grpc/grpc
>> uses a shared file to generate code for several build systems instead
>> of maintaining them individually. I plan on doing the work anyway just
>> because I have my own reasons to use CMake in Git (for packaging in
>> https://github.com/ruslo/hunter is my main motive here). Whether or
>> not it is maintained upstream is not a real concern for me at the
>> moment.
>
> [...]
>>
>> I'll see how the Windows build currently works and if that makes
>> sense, maybe I'll try using that build generator here too.
>>
>> Thanks for the feedback,
>>
>> Isaac
>
>
> Look at the "vcxproj:" target in config.mak.uname (in the GfW repo).
>
> Jeff

  parent reply	other threads:[~2018-01-26  0:21 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-23  0:16 [RFC PATCH 0/1] Implement CMake build Isaac Hier
2018-01-23  0:16 ` [RFC PATCH 1/1] " Isaac Hier
2018-01-24 13:45 ` [RFC PATCH 0/1] " Isaac Hier
2018-01-24 18:11   ` Jacob Keller
2018-01-24 18:47   ` Junio C Hamano
2018-01-24 20:53     ` Ævar Arnfjörð Bjarmason
2018-01-24 21:15   ` Stephan Beyer
2018-01-24 21:19     ` Isaac Hier
2018-01-24 22:02       ` Stephan Beyer
2018-01-25  2:16         ` Isaac Hier
2018-01-24 19:36 ` Jeff Hostetler
2018-01-24 19:59   ` Isaac Hier
2018-01-24 21:00     ` Jeff Hostetler
2018-01-24 21:17       ` Isaac Hier
2018-01-26  0:21       ` Isaac Hier [this message]
2018-01-26 17:34         ` Jeff Hostetler
2018-02-20 16:28         ` Robert Dailey
2018-02-23 18:48           ` Isaac Hier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAG6xkCa_nKtzhJJq=v7gazWe+8FnN3mz1vDftzZw2WUFqJ1bzw@mail.gmail.com' \
    --to=isaachier@gmail.com \
    --cc=avarab@gmail.com \
    --cc=git@jeffhostetler.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).