<div>To use "--debug-trycompile" effectively, you have to:</div><div><br></div><div>- run *without* "--debug-trycompile" all the way through once to establish all the cache settings</div>- remove/delete the *single* cache entry whose try_compile result you are trying to debug<div>
- run again with "--debug-trycompile"</div><div><br></div><div>The reasons are:</div><div>- try_compile operations generate a project and a project build tree, and then clean up after themselves (delete the generated project source and build tree)</div>
<div>- only one try_compile operation may be executed at a time because they all share the same source and build trees<br>- clean up must occur in between runs so that each one is correct and independent of all the other ones</div>
<div>- --debug-trycompile *leaves* *the* try_compile project source and build tree on disk so that you can inspect them, and presumably "debug" the problem</div><div><br></div><div>So..... given this view into the implementation details of try_compile, you cannot count on the results of --debug-trycompile to be accurate for more than one try_compile in a row. Leaving the build tree from a previous try_compile operation affects the results of subsequent try_compiler operations. Only one at a time may be "debugged".</div>
<div><br></div><div>(I realize this belongs in the documentation somewhere, but my question to you is: where would you have looked first for such documentation? If you can answer that, or several people answer approximately the same way, then I could add documentation for this in such a spot. -- Thanks.)</div>
<div><br></div><div><br></div><div>Hope this helps,</div><div>David</div><div><br></div><div><br><div class="gmail_quote">On Fri, Feb 11, 2011 at 2:57 AM, Jack Poulson <span dir="ltr"><<a href="mailto:jack.poulson@gmail.com">jack.poulson@gmail.com</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">On Fri, Feb 11, 2011 at 1:47 AM, Michael Wild <span dir="ltr"><<a href="mailto:themiwi@gmail.com" target="_blank">themiwi@gmail.com</a>></span> wrote:<br>
</div><div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div></div><div>On 02/11/2011 04:30 AM, Jack Poulson wrote:<br>
> This is occurring with CMake 2.8.3 on OSX for several different<br>
> check_function_exists calls. Is this expected behavior?<br>
><br>
> Jack<br>
<br>
</div></div>Seriously, we're going to need some more information than just "I get<br>
false positives"...<br>
<br></blockquote><div><br></div></div><div>I did not give any more information because, well, it seems to _always_ give false positives with those settings. I don't really care if it's fixed because I can easily work around it, but I thought I'd give you guys a heads up.</div>
<div><br></div><div>If it helps, this is the relevant snippet:</div><div><br></div><div>include(CheckFunctionExists)</div><div>set(CMAKE_REQUIRED_LIBRARIES ${MATH_LIBS})</div><div>check_function_exists(vdSin MKL)</div><div>
check_function_exists(vsin MASS)</div><div><br></div><div>If I run without --debug-trycompile when I am not linking in the MKL or MASS libraries, the routines vdSin and vsin are not found. When I run with --debug-trycompile, they are found. That's all I have time to give. Use it or not. I'm not asking for help.</div>
<div><br></div><font color="#888888"><div>Jack</div></font></div>
<br>_______________________________________________<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></blockquote></div><br></div>