Re: [cmake-developers] unset and cache variables

2018-08-16 Thread James Touton
Fair enough, but I think that makes the command substantially less useful. It means that I need to use set(BLAH "") if I want to empty a variable of its contents, and I can never actually make it become undefined, counter to the claim in the documentation: set(BLAH blah CACHE INTERNAL "") unset(BL

Re: [cmake-developers] unset and cache variables

2018-08-16 Thread Robert Maynard
Looking at the current docs ( https://cmake.org/cmake/help/v3.12/command/unset.html ) I think the first paragraph needs to be read as a single statement to understand the behavior. "Removes the specified variable causing it to become undefined. If CACHE is present then the variable is removed from

[cmake-developers] unset and cache variables

2018-08-16 Thread James Touton
I just recently came across this: set(BLAH blah CACHE INTERNAL "") unset(BLAH) message("BLAH: ${BLAH}") Surprisingly (to me), this prints out "blah". I had expected the unset command to make the cached value inaccessible. The documentation just states that the function "[r]emoves the specified