[CMake] Howto unset cache variable without UNSET()
Alexander Neundorf
a.neundorf-work at gmx.net
Wed Jun 30 11:51:59 EDT 2010
On Wednesday 30 June 2010, Marcel Loose wrote:
> Hi all,
>
> Is there a way to unset a cache variable, i.e. make it undefined,
> *without* using unset().
>
> My reason for asking is that my CMake scripts need to be backward
> compatible with every 2.6 version. Unfortunately, unset() was added in a
> patch release (2.6.3 if I recall correctly), so I cannot use it.
>
> The problem is that, though 'set(FOO)' will make FOO undefined, this
> doesn't seem to work for 'set(FOO CACHE INTERNAL "Foo")'.
Does it really have to be unset or would empty or "FALSE" also do ?
Before 2.6.3 there is no way to get something removed from the cache.
Alex
More information about the CMake
mailing list