[CMake] set/unset

Philip Lowman philip at yhbt.com
Tue Feb 10 07:49:34 EST 2009

On Tue, Feb 10, 2009 at 3:35 AM, Micha Renner <Micha.Renner at t-online.de>wrote:

> Hallo,
> what is the difference between
> SET(variable )
> and
> UNSET(variable)

Nothing.  The unset command was added for completeness and so that there
could be an additional option added to it to allow removal of cache
variables.  Also, it is often the case that someone reading CMake scripts
for the first time might be confused over the meaning of set(foo) and think
that it defines a variable setting it to empty when it actually undefines a
variable.  Hopefully over time, unset() will remove any confusion here.  The
command will be in the 2.6.3 release.  Obviously please be careful using
this command if compatibility with earlier versions of CMake is a concern.

Philip Lowman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090210/ee257f01/attachment.htm>

More information about the CMake mailing list