[CMake] Using xilink

Brad King brad.king at kitware.com
Mon Nov 22 12:43:47 EST 2010


On 11/22/2010 10:42 AM, ycollette.nospam at free.fr wrote:
> I have tried to launch cmake from the visual studio console and from a fresh dos console in which I set the paths to intel fortran bin directory and the result is that cmake doesn't detect xilink.
> In the first case (visual console), cmake detect the visual linker.
> In the second case (dos console with path set to intel compiler), cmake cannot detect a linker.
[snip]
> I have added  set_property(TARGET Arc3D PROPERTY INTERPROCEDURAL_OPTIMIZATION 1) in my CMakeLists.txt.

It looks like this property has been implemented only for Intel on Linux.

However, Modules/Platform/Windows-icl.cmake hard-codes use of "xilink" for
linking shared libraries and uses the compiler to link executables regardless
of the value of CMAKE_LINKER.  Going back to your original post, if you use

enable_language(Fortran)

or pass the language to the project() command (see its documentation) then
the Windows-icl information should be loaded to configure the build rules.

-Brad


More information about the CMake mailing list