Re: [PATCH 0/8] CMake build system for git
- From
Sibi Siddharthan <sibisiddharthan.github@gmail.com>
- Date
- May 2, 2020, 15:16 UTC
- Message-ID
- <CAKiG+9Xk5vgNxYZ7kNsUhgv0oopY-057VexUK=iE6dX6GKPrqA@mail.gmail.com>
- In-Reply-To
- <20200502150200.GA26423@danh.dev>
On Sat, May 2, 2020 at 8:32 PM Danh Doan <congdanhqx@gmail.com> wrote:
Show 20 quoted lines
> > On 2020-05-02 20:20:50+0530, Sibi Siddharthan <sibisiddharthan.github@gmail.com> wrote: > > On Sat, May 2, 2020 at 6:51 PM Danh Doan <congdanhqx@gmail.com> wrote: > > 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. > > Ah, this is what I mean, I think it's better to use this (without > if_not_define) > > set(SHELL_PATH "/bin/sh" CACHE PATH "path to POSIX compliance shell") > > Then, we can use this: > > cmake -DSHELL_PATH=/path/to/good/sh ... >
If you CACHE the variable, you have to do this cmake -USHELL_PATH -DSHELL_PATH=/path/to/good/sh
I know it is bad. Otherwise you can modify the cache entry directly in CMakeCache.txt.
Thank You, Sibi Siddharthan
> -- > Danh