<html><body bgcolor="#FFFFFF"><div><span class="Apple-style-span" style="-webkit-composition-fill-color: rgba(175, 192, 227, 0.231373); -webkit-composition-frame-color: rgba(77, 128, 180, 0.231373); ">On Mar 31, 2009, at 8:46 PM, Philip Lowman &lt;<a href="mailto:philip@yhbt.com">philip@yhbt.com</a>> wrote:</span><br></div><div><br></div><div></div><blockquote type="cite"><div><div class="gmail_quote">On Tue, Mar 31, 2009 at 6:13 PM, James Bigler <span dir="ltr">&lt;<a href="mailto:jamesbigler@gmail.com"><a href="mailto:jamesbigler@gmail.com">jamesbigler@gmail.com</a></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.&nbsp; 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.&nbsp; My discovery was that using the environment variable mechanism is a great alternative to a global variable. ;)</div>
</div></blockquote><div><br>Clever.&nbsp; There is also CACHE INTERNAL which is a safer way of doing what you're trying to do you might consider trying out.&nbsp; With CACHE INTERNAL you can't accidentally trounce environment variables that may affect execution of your CMake scripts.&nbsp; It is slightly more verbose, however.<br>
<br>set(foo bar CACHE INTERNAL "")<br></div></div><br>-- <br>Philip Lowman<br>
</div></blockquote><br><div>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.&nbsp;</div><div><br></div><div>James</div></body></html>