[CMake] what is wrong with this snippet? (bug?)

2008-11-20 Thread Matthew Woehlke

set(!BANG wacky CACHE STRING "" FORCE)
set("var with space" wacky CACHE STRING "" FORCE)
message(STATUS "This is !BANG: ${!BANG}")
message(STATUS "This is var with space: ${var with space}")

The above snippet (as expected) causes a CMake error. What's interesting 
is that the error is in the message, not the set. More so, the variables 
do indeed end up in the cache!


The utility of a variable that can't be referenced seems... dubious. 
Should CMake prevent this?


(cmake 2.6-2)

--
Matthew
Please do not quote my e-mail address unobfuscated in message bodies.
--
C++ is for people who want to be able to not just shoot themselves in 
the foot, but do it with a rocket launcher. -- Igor Peshansky


___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] what is wrong with this snippet? (bug?)

2008-12-04 Thread Matthew Woehlke

Matthew Woehlke wrote:

set(!BANG wacky CACHE STRING "" FORCE)
set("var with space" wacky CACHE STRING "" FORCE)
message(STATUS "This is !BANG: ${!BANG}")
message(STATUS "This is var with space: ${var with space}")

The above snippet (as expected) causes a CMake error. What's interesting 
is that the error is in the message, not the set. More so, the variables 
do indeed end up in the cache!


The utility of a variable that can't be referenced seems... dubious. 
Should CMake prevent this?


(cmake 2.6-2)


ping?

--
Matthew
Please do not quote my e-mail address unobfuscated in message bodies.
--
Microsoft, electricity, network connectivity. For a secure system pick 
any two. -- Iain D Broadfoot (paraphrased, from cluefire.net)


___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] what is wrong with this snippet? (bug?)

2008-12-04 Thread Bill Hoffman

Matthew Woehlke wrote:

Matthew Woehlke wrote:

set(!BANG wacky CACHE STRING "" FORCE)
set("var with space" wacky CACHE STRING "" FORCE)
message(STATUS "This is !BANG: ${!BANG}")
message(STATUS "This is var with space: ${var with space}")

The above snippet (as expected) causes a CMake error. What's 
interesting is that the error is in the message, not the set. More so, 
the variables do indeed end up in the cache!


The utility of a variable that can't be referenced seems... dubious. 
Should CMake prevent this?


(cmake 2.6-2)


ping?

Please create a bug entry.  Also, don't create variables with odd 
characters in them as CMake does not correctly warn that this is invalid 
right now.  :)



-Bill

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] what is wrong with this snippet? (bug?)

2008-12-04 Thread Matthew Woehlke

Bill Hoffman wrote:

Matthew Woehlke wrote:

Matthew Woehlke wrote:

set(!BANG wacky CACHE STRING "" FORCE)
set("var with space" wacky CACHE STRING "" FORCE)
message(STATUS "This is !BANG: ${!BANG}")
message(STATUS "This is var with space: ${var with space}")

The above snippet (as expected) causes a CMake error. What's 
interesting is that the error is in the message, not the set. More 
so, the variables do indeed end up in the cache!


The utility of a variable that can't be referenced seems... dubious. 
Should CMake prevent this?


(cmake 2.6-2)


ping?


Please create a bug entry.


Done [1], and thanks. I wasn't sure how this was supposed to work.

 Also, don't create variables with odd 
characters in them as CMake does not correctly warn that this is invalid 
right now.  :)


No worries, I was actually hoping the set would fail also. As mentioned 
in [2] I was trying to work around bug 8226 [3], and wanted to verify 
that such variables were invalid. So, I hope they will stay invalid ;-). 
(But yes, it would be good for SET to fail, as well as expansion.)


1: http://public.kitware.com/Bug/view.php?id=8228
2: http://permalink.gmane.org/gmane.comp.programming.tools.cmake.user/17555
3: http://public.kitware.com/Bug/view.php?id=8226

--
Matthew
Please do not quote my e-mail address unobfuscated in message bodies.
--
Microsoft, electricity, network connectivity. For a secure system pick 
any two. -- Iain D Broadfoot (paraphrased, from cluefire.net)


___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake