<div class="gmail_quote">On Tue, Mar 31, 2009 at 6:13 PM, James Bigler <span dir="ltr"><<a href="mailto:jamesbigler@gmail.com">jamesbigler@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="gmail_quote"><div>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. ;)</div>
</div></blockquote><div><br>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.<br>
<br>set(foo bar CACHE INTERNAL "")<br></div></div><br>-- <br>Philip Lowman<br>