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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, May 2, 2020 at 6:51 PM Danh Doan <congdanhqx@xxxxxxxxx> wrote:
>
> Hi Sibi,
>
> On 2020-04-29 14:12:43+0530, Sibi Siddharthan <sibisiddharthan.github@xxxxxxxxx> wrote:
> > > > Please correct me if I were wrong (I recall this from my memory
> > > > without checking anything).
> > > >
> > > > The worst thing about CMake is we can't override (Make's) variable
> > > > in Makefile generated by CMake.
> > >
> > > I really don't know enough about cmake to say one way or the other. I
> > > can well believe there are parts of the Makefile that will need to be
> > > manually translated, and that it may not ever hit full parity.
> > >
> > > But as long as it just a tool for people using Visual Studio, and if
> > > they are happier being able to use that tool, even with a few
> > > deficiencies, then it may still be worth doing.
> > Adding the CMake script to contrib/buildsystem is a good option.
> > Is there any changes (apart from the CMakeLists.txt critique and) that
> > I have to do on my part?
>
> (Sorry for this late reply, it's holiday over here).
>
> It's long time since last time I worked with CMake, but I have some
> suggestion, maybe it was written in my previous comment, maybe not.
>
> - If we could find anything in CMake that equivalent with `sysconfdir`
>   in autotools, please use it for configuration files instead of
>   relative to `CMAKE_INSTALL_PREFIX`

The module GNUInstallDirs does what you ask.

> - I'll change (this and alikes)
>         find_program(SH_PATH, "sh")
>   with:
>         option(SHELL_PATH "path to POSIX compliance shell" "/bin/sh")
>   in order to support Solaris people, should they want to try CMake
> - I'll wrap the incompatible option of gettext under uname check
> - and remove ${} around variable in `if`
>

The thing with options in cmake is the values it takes are boolean only.
To do what you want I think you have to do something along the lines of this.
if(NOT DEFINED SHELL_PATH)
set(SHELL_PATH  <default value> CACHE STRING "path to POSIX compliance shell")
endif()

Then if you want to change this value, edit this value in CMakeCache.txt.

Thank You,
Sibi Siddharthan

> --
> Danh



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux