Thanks all, I was missing the quotes around the initial ${FOO} in my tests...<div><br></div><div>if("${FOO}" STREQUAL "${BAR}") </div><div><br></div><div>does what I wanted.<br><br><div class="gmail_quote">
On Tue, Sep 29, 2009 at 1:51 PM, Nathaniel Waisbrot (Cont ARL/CISD) <span dir="ltr"><<a href="mailto:nathaniel.waisbrot@arl.army.mil">nathaniel.waisbrot@arl.army.mil</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">> Of course I read the docs for the if() command. It doesn't contain<br>
> any comments about comparing a variable's value to another variable's<br>
> value. Are you suggesting that if it isn't in the documentation then<br>
> it isn't supported? If so, please say so. I was just hoping<br>
> someone might know a way to do this kind of test/comparison.<br>
<br>
<br>
<br>
</div>Maybe the information that you're missing is that all CMake variables<br>
are stored internally as strings. So paths, lists, numbers, etc can be<br>
compared with STREQUAL.<br>
<br>
<br>
</blockquote></div><br></div>