Yes... this confused me when I first encountered it as well.<br><br>TRY_COMPILE is misnamed in CMake.<br><br>In functionality, it's actually a TRY_LINK operation.<br><br><br><div class="gmail_quote">On Tue, Jan 11, 2011 at 10:59 AM, Marcel Loose <span dir="ltr"><<a href="mailto:loose@astron.nl">loose@astron.nl</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi David,<br>
<br>
I guess you're right. Further playing with CheckCXXSourceCompiles and<br>
investigating the generated CMakeLists.txt file led me to the conclusion<br>
that the link step is indeed also performed. I was led astray by the<br>
name of the command and my notion that it wraps TRY_COMPILE. Also my<br>
background in the GNU Autotools, which has TRY_COMPILE, TRY_LINK and<br>
TRY_RUN, didn't really help. Sorry for the noise.<br>
<div class="im"><br>
Best regards,<br>
Marcel Loose.<br>
<br>
--<br>
Marcel Loose<br>
Senior Software Engineer, Computing Group R&D, Astron, the Netherlands<br>
</div>>>> David Cole 11-01-11 13:44 >>><br>
<div class="im">Doesn't CheckCXXSourceCompiles link?<br>
<br>
I think there's no way to avoid the link in a try_compile...<br>
<br>
<br>
</div><div><div></div><div class="h5">On Tue, Jan 11, 2011 at 5:49 AM, Marcel Loose wrote:<br>
<br>
> Hi all,<br>
><br>
> I was wondering how I can check whether I can successfully compile and<br>
> link an executable, without actually running it.<br>
CheckCXXSourceCompiles<br>
> checks whether I can compile the code, however linking could still<br>
fail.<br>
> CheckCXXSourceRuns OTOH also tries to run the executable, which causes<br>
> problems when cross-compiling. So, why is there no<br>
CheckCXXSourceLinks?<br>
><br>
> Best regards,<br>
> Marcel Loose.<br>
><br>
><br>
><br>
> --<br>
> Marcel Loose<br>
> Senior Software Engineer, Computing Group R&D, Astron, the Netherlands<br>
><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<br>
> <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:<br>
> <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>
><br>
<br>
</div></div></blockquote></div><br>