MantisBT - CMake
View Issue Details
0013049CMakeCMakepublic2012-03-17 12:432012-03-18 06:38
kiri 
 
normalmajoralways
closedno change required 
 
 
0013049: unset does not function for cached variables
Contrary to the documentation, using Set() or Unset() to unset a cached variable does not function.
Executing the test case below with
cmake -P
yields:
ShouldNotBeSet = 1

Test:

Set ( ShouldNotBeSet 1 CACHE INTERNAL "Test" )
Set ( ShouldNotBeSet )
Unset ( ShouldNotBeSet )
Message ("ShouldNotBeSet = " ${ShouldNotBeSet})
No tags attached.
Issue History
2012-03-17 12:43kiriNew Issue
2012-03-17 15:01Alex NeundorfNote Added: 0028926
2012-03-17 16:03kiriNote Added: 0028927
2012-03-18 06:38Alex NeundorfNote Added: 0028928
2012-03-18 06:38Alex NeundorfStatusnew => closed
2012-03-18 06:38Alex NeundorfResolutionopen => no change required

Notes
(0028926)
Alex Neundorf   
2012-03-17 15:01   
Use unset(... CACHE) to remove a variable from the cache.
set() and unset() without "CACHE" work on the normal variables, which are like a layer of variables on top of the cache variables.
(0028927)
kiri   
2012-03-17 16:03   
Unset ( variable CACHE )
works. The documentation for unset() looks adequate also.
I would like to mark this bug as resolved but see no option to in Mantis.
(0028928)
Alex Neundorf   
2012-03-18 06:38   
I can do it, maybe you don't have permissions to do it as reporter.

So, marked as resolved with no change required, as requested.