[CMake] TRY_LINK and CheckCXXSourceLinks ??
Marcel Loose
loose at astron.nl
Tue Jan 11 10:59:38 EST 2011
Hi David,
I guess you're right. Further playing with CheckCXXSourceCompiles and
investigating the generated CMakeLists.txt file led me to the conclusion
that the link step is indeed also performed. I was led astray by the
name of the command and my notion that it wraps TRY_COMPILE. Also my
background in the GNU Autotools, which has TRY_COMPILE, TRY_LINK and
TRY_RUN, didn't really help. Sorry for the noise.
Best regards,
Marcel Loose.
--
Marcel Loose
Senior Software Engineer, Computing Group R&D, Astron, the Netherlands
>>> David Cole 11-01-11 13:44 >>>
Doesn't CheckCXXSourceCompiles link?
I think there's no way to avoid the link in a try_compile...
On Tue, Jan 11, 2011 at 5:49 AM, Marcel Loose wrote:
> Hi all,
>
> I was wondering how I can check whether I can successfully compile and
> link an executable, without actually running it.
CheckCXXSourceCompiles
> checks whether I can compile the code, however linking could still
fail.
> CheckCXXSourceRuns OTOH also tries to run the executable, which causes
> problems when cross-compiling. So, why is there no
CheckCXXSourceLinks?
>
> Best regards,
> Marcel Loose.
>
>
>
> --
> Marcel Loose
> Senior Software Engineer, Computing Group R&D, Astron, the Netherlands
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
More information about the CMake
mailing list