Well there you go, deleting the cache & reconfiguring fixed it. That was weird.<div><br></div><div>Thanks for the help!<br clear="all"><div><br></div><div>---------</div>Robert Dailey<br>
<br><br><div class="gmail_quote">On Thu, Oct 6, 2011 at 1:50 PM, Robert Dailey <span dir="ltr"><<a href="mailto:rcdailey@gmail.com">rcdailey@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Ok interesting, it is working for me too. I guess my reproducible use case was invalid.<div><br></div><div>(BTW, I'm running through cmake-gui on Windows 7 x64 using CMake version 2.8.5)<br><div><br></div><div>My use case was a simplified version of the real code. FUBARTEST is actually a cache variable defined by the root CMakeLists.txt file. In my real test case, my STREQUAL statement is failing to execute the conditional code when I do this:</div>
<div><br></div><div>if( NEMO_TARGET STREQUAL "NSPR" )</div><div><br></div><div>However if I do this, it works:</div><div><br></div><div>if( "${NEMO_TARGET}" STREQUAL "NSPR" )</div><div><br></div>
<div>I don't know why both would behave differently. Just to rule out the cache variable being the issue, I tried this (I attempted to make the SET() call override the originally defined cache variable. I did not actually remove the variable from cache):</div>
<div><br></div><div><div>set( NEMO_TARGET "NSPR" )</div><div>if( NEMO_TARGET STREQUAL "NSPR" )</div><div><br></div><div>Of course, this statement did not result in the enclosed message() being executed.</div>
<div><br></div><div>I have tried creating a small test case to reproduce this issue but so far I have been unsuccessful. I'll try clearing my cache to rule out any issues there. In the meantime if you have any suspicions or have run into this before, please give me some ideas on how to solve this :)</div>
<div><br></div><div>Thanks.</div><div><br></div><div>---------</div>Robert Dailey<div><div></div><div class="h5"><br>
<br><br><div class="gmail_quote">On Thu, Oct 6, 2011 at 1:31 PM, Eric Noulard <span dir="ltr"><<a href="mailto:eric.noulard@gmail.com" target="_blank">eric.noulard@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2011/10/6 Robert Dailey <<a href="mailto:rcdailey@gmail.com" target="_blank">rcdailey@gmail.com</a>>:<br>
<div><div></div><div>> According to the CMake documentation, the `STREQUAL` comparison is allowed<br>
> to take either a VARIABLE or a STRING as either parameter. So, in this<br>
> example below, the message does NOT print, which is broken:<br>
> set( FUBARTEST "OK" )<br>
> if( FUBARTEST STREQUAL "OK" )<br>
> message( "It Worked" )<br>
> endif()<br>
> Any reason why this isn't working as documented?<br>
<br>
</div></div>Don't know but it works just fine for on Linux + CMake 2.8.6<br>
which cmake version are you using?<br>
<br>
Could you try running<br>
cmake --trace --debug-output -P fubartest.cmake<br>
<br>
and tell us waht's printed out?<br>
<font color="#888888"><br>
<br>
<br>
--<br>
Erk<br>
Membre de l'April - « promouvoir et défendre le logiciel libre » -<br>
<a href="http://www.april.org" target="_blank">http://www.april.org</a><br>
</font></blockquote></div><br></div></div></div></div>
</blockquote></div><br></div>