<div class="gmail_quote">On Sat, Mar 21, 2009 at 10:01 PM, Robert Dailey <span dir="ltr">&lt;<a href="mailto:rcdailey@gmail.com">rcdailey@gmail.com</a>&gt;</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><div></div><div class="h5">On Sat, Mar 21, 2009 at 7:42 PM, Philip Lowman <span dir="ltr">&lt;<a href="mailto:philip@yhbt.com" target="_blank">philip@yhbt.com</a>&gt;</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><div></div><div>On Sat, Mar 21, 2009 at 8:00 PM, Robert Dailey <span dir="ltr">&lt;<a href="mailto:rcdailey@gmail.com" target="_blank">rcdailey@gmail.com</a>&gt;</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;">


I currently have the following macro:<br><br><font face="&#39;courier new&#39;, monospace">macro( get_conf_dependencies var_name project_name debug )<br>    if( debug )<br>        message( &quot;Using DEBUG&quot; )<br>
        set( ${var_name} ${${project_name}_DEBUG_DEPENDENCIES} )<br>    else()<br>        set( ${var_name} ${${project_name}_RELEASE_DEPENDENCIES} )<br>    endif()<br>endmacro()</font><div><font size="2" face="&#39;courier new&#39;"><span style="font-size: 10px;"><br>



</span></font></div>I then call the macro in two particular ways:<div><br></div><div><font face="&#39;courier new&#39;, monospace">get_conf_dependencies( myVar myProject TRUE )</font></div><font face="&#39;courier new&#39;, monospace">get_conf_dependencies( myVar myProject FALSE )</font><div>



<br></div><div>In both cases, I <b><i>do not</i></b> get the message &quot;Using DEBUG&quot;. Are my eyes playing tricks on me, or is CMake not processing trivial boolean logic properly in its conditionals? I&#39;m using version 2.6.3.</div>


</blockquote></div></div><div><br>I ran into the same issue a while back.  Use a function() or actual variables in your call to get_conf_dependencies.<br><a href="http://public.kitware.com/Bug/view.php?id=8397" style="text-decoration: none;" target="_blank"><span style="text-decoration: underline;">http://public.kitware.com/Bug/</span>view.php?id=8397</a></div>

</div></blockquote><div><br></div></div></div><div>What do you mean by &quot;actual variables&quot;? </div></div>
</blockquote></div><br>You could do this:<br><br>set(myBool TRUE)<br>get_conf_dependencies(myVar myProject myBool)<br>...provided you change &quot;if(debug)&quot; to &quot;if(${debug})&quot; in your macro.<br><br>Making it a function() and using PARENT_SCOPE is probably a cleaner option:<br>
<font face="&#39;courier new&#39;, monospace">set( ${var_name} ${${project_name}_RELEASE_DEPENDENCIES} PARENT_SCOPE)</font><br><br>-- <br>Philip Lowman<br>