Subject: Re: [PATCH 0/8] CMake build system for git

From: Konstantin Tokarev <[email-masked]>
Date: Sun, 03 May 2020 22:42:01 +0300

03.05.2020, 20:21, "Junio C Hamano" <[email-masked]>:
> Sibi Siddharthan <[email-masked]> writes:
>
>>>  As you say, an extra instruction in INSTALL file to tell users to
>>>  copy from contrib/cmake may workable, though it is unsatisfactory.
>>>  But the other one will not simply work. If we need to have a new
>>>  file with string "CMake" in its name at the top-level *anyway*, we
>>>  should have the real thing to reduce one step from those who want to
>>>  use it. Those who do not want to see "CMake" at the toplevel are
>>>  already harmed either way, if is a dummy or if it is the real thing.
>>
>>  In your opinion, what would be the best way to communicate with users, there is
>>  an optional CMake build system for git?
>
> You do not want to hear my opinion, as my priorities would be
> different from yours ;-)
>
> Given that we all agreed that the only reason we contemplate use of
> CMake in our project is strictly to help Windows build, i.e. due to
> the same reason why we have contrib/buildsystems/, it is not one of
> my goals to communicate with general users about optional CMake
> support in the first place. It has lower priority than keeping the
> project tree and the project history less cluttered.
>
> So my first preference would be an instruction somewhere in install
> or readme that tells those who want to build for windows to copy
> from (or perhaps update cmake to offer the "-f" option and tell it
> to read from) contrib/cmake/CMakeLists.txt to the toplevel before
> doing anything [*1*].

FWIW, CMakeLists.txt doesn't have to be in the root of source tree in
order to work. It can perfectly work from contrib/cmake after necessary
changes in relative paths.

>
> If there are many people who want to help the cmake effort, however,
> shipping a real CMakeLists.txt at the top-level of the tree, with
> all the instructions at the beginning of *that* file, would be an
> easier way for them to discover and polish. It would also be my
> preference but only under the "if there are many people" condition.
>
> Thanks.
>
> [Footnote]
>
> *1* It probably is too error prone to tell people who do the real
>     work to "copy", as they are prone to modify the copy and forget
>     updating the source. So the instruction may tell them to create
>     a symlink at the toplevel that points to the real file in the
>     contrib/cmake/ directory, or if the filesystem does not support
>     symbolic links (which is very likely given the target audience
>     of this are all on Windows), tell them copy a small skeleton
>     file that is also shipped in contrib/cmake/ directory to the
>     top-level. That skeleton file would "include" the real thing
>     that lives in contrib/cmake/ directory (I am assuming that
>     CMakeLists.txt can include other CMakeLists.txt file here).

-- 
Regards,
Konstantin