[CMake] Unknown CMake command "UNSET".

Alexander Neundorf a.neundorf-work at gmx.net
Mon Jan 4 13:19:27 EST 2010


On Monday 04 January 2010, Aaron_Wright at selinc.com wrote:
> I'm not trying to do anything too fancy, just trying to call:
>
> UNSET(<variable> CACHE)
>
> It works with MSVC, but in linux I get:
>
> Unknown CMake command "UNSET".
>
> Am I missing something? Linux is version 2.6.2, and MSVC is 2.6.4. I'm

http://www.cmake.org/Wiki/CMake_Released_Versions

unset() exists since 2.6.3:
http://www.cmake.org/Wiki/CMake_2.6.3_Docs
http://www.cmake.org/Wiki/CMake_2.6.2_Docs

In many cases a 
set(FOO NOTFOUND CACHE STRING "docs..." FORCE)
(or FALSE or "" instead of NOTFOUND) is also good enough.

> asking first because I don't want to update the linux version, as that is
> difficult.

You can just download the binary packages for Linux available here:
http://www.cmake.org/cmake/resources/software.html
(http://www.cmake.org/files/v2.8/cmake-2.8.0-Linux-i386.tar.gz), and unpack it 
somewhere on your machine (e.g. in /opt/) and then call this cmake executable 
directly.

Alex


More information about the CMake mailing list