[CMake] How to get around a CACHE problem?

Christian Convey christian.convey at gmail.com
Mon Aug 6 12:30:52 EDT 2007


On 8/6/07, Eric Noulard <eric.noulard at gmail.com> wrote:
> 2007/8/5, Christian Convey <christian.convey at gmail.com>:
> [...]

> If I summarize I think a VAR may be tested with
>
> IF (DEFINED VAR)  --> if true VAR is defined with a value
> IF (CACHED VAR)   --> if true VAR value comes from CACHE
> IF (PROVIDED VAR) --> if true the VAR value was provided by user
>                                     either using GUI or command line -D
> IF (GUESSED VAR) --> if true the VAR value comes from a DEFAULT
>                                    guessed or built-in value
>
> We may have GUESSED AND CACHED or PROVIDED AND CACHED.
> (Which means the cache file should contains the GUESSED/PROVIDED state)
>
> The default "state" of a VAR upon SET would be "PROVIDED"
> but the CMake macro writer may want to SET value as a GUESSED.
>
> SET(VAR [VALUE] [CACHE TYPE DOCSTRING [FORCE]] [GUESSED])
>
> Do you think this proposition deserve a feature request?
>

I think something about CMake needs rethinking if the solution is
looking this complicated.


More information about the CMake mailing list