On Thu, Jul 21, 2011 at 1:44 AM, Michael Wild <span dir="ltr"><<a href="mailto:themiwi@gmail.com">themiwi@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 07/21/2011 07:07 AM, Jookia wrote:<br>
> Running the follow file causes problems:<br>
><br>
> if(NOT "${CMAKE_BINARY_DIR}" MATCHES "${CMAKE_SOURCE_DIR}")<br>
> endif()<br>
<br>
</div>MATCHES matches the LHS string against the regex on the RHS. Probably<br>
you wanted to use STREQUAL instead.<br>
<font color="#888888"><br>
Michael<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br><div>Michael's right here. A directory name is not a regular expression... It could be, as long as the dir name does not include any special regex characters. But as soon as you add one, you'll get unexpected results.</div>
<div><br></div><div>In this particular case, use STREQUAL if you're trying to detect a source dir == binary dir condition...</div><div><br></div><div>HTH,</div><div>David</div><div><br></div>