On Mar 31, 2009, at 8:46 PM, Philip Lowman <[email protected]> wrote:
On Tue, Mar 31, 2009 at 6:13 PM, James Bigler
<[email protected]> wrote:
I just recently discovered another way to do this. I was troubled
that pushing it up to the parent scope only pushes it up one level,
so if you want to push a variable up to the top, you must push it at
each level in the tree. My discovery was that using the environment
variable mechanism is a great alternative to a global variable. ;)
Clever. There is also CACHE INTERNAL which is a safer way of doing
what you're trying to do you might consider trying out. With CACHE
INTERNAL you can't accidentally trounce environment variables that
may affect execution of your CMake scripts. It is slightly more
verbose, however.
set(foo bar CACHE INTERNAL "")
--
Philip Lowman
That was one of the first things I tried, but there were some issues
with it that I don't quite recall at the moment. Of course that
experiment was a year and a half ago back in the 2.4 days.
James
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake