Hi,<br><br>I learned something very valuable today about cmake after getting an unexpected result with STREQUAL:<br><br>set(foo bar)<br>...<br>set(baz foo)<br>...<br>if(&quot;${baz}&quot; STREQUAL &quot;bar&quot;) # This evaluates to true.<br>
...<br><br>I expected it to be false, because I was trying to get baz&#39;s value (&quot;foo&quot;) to compare with &quot;bar&quot;.  I thought that parameters explicitly quoted were treated as strings.<br><br>Then I learned that the interpreter is the only one that sees quotes around parameters, for the sole purpose of string interpolation and preventing whitespace from splitting a parameter.  Cmake commands do not see these quotes. Therefore, STREQUAL can never know the difference between &quot;baz&quot; and baz.<br>
<br>So, STREQUAL treats a parameter as a variable name if it is defined, but as a string value if it is not.  (I verified this in cmIfCommand.cxx)<br><br>Is this quote behavior well-known among cmake users?  For others like me, I&#39;d like this behavior to be emphasized in the cmake docs for STREQUAL.<br>
<br>Happy Valentine&#39;s.<br><br>Shaun<br>