<div class="gmail_quote">On Thu, Oct 20, 2011 at 12:56 PM, Michael Hertling <span dir="ltr"><<a href="mailto:mhertling@online.de">mhertling@online.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 10/20/2011 06:59 PM, Robert Dailey wrote:<br>
> Let me ask this,<br>
><br>
> What would be the parent of a function located in the root CMakeLists file<br>
> but called from a subordinate CMakeLists file?<br>
<br>
</div>It's the subordinate CMakeLists.txt file's parent, but what Michael<br>
probably aims at is that some variables undergo a lazy evaluation,<br>
i.e. when you say<br>
<div class="im"><br>
set( CMAKE_MFC_FLAG 2 )<br>
add_executable( ... )<br>
<br>
</div>in a function, and CMAKE_MFC_FLAG isn't evaluated till generation time,<br>
the value "2" will be lost since it is limited to the function's scope.<br>
See the following project for an example:</blockquote><div><br></div><div>Does this lazy evaluation also apply to variables set with PARENT_SCOPE? If so, that would explain why not even that helped. </div></div>