[CMake] Mixed Fortran and C++ projects in Visual Studio with Intel Fortran Compiler

Andreas Mohr andi at lisas.de
Fri Jun 25 11:19:00 EDT 2010


On Fri, Jun 25, 2010 at 08:23:06AM -0400, cmake-request at cmake.org wrote:
> So is there any way in cmake to enforce Visual Studio to use link.exe instead of xilink.exe?

grep -i LINK /usr/share/cmake-2.8/Modules/Platform/*|less

yields a ton of link-related CMake variables during platform setup,
thus something like CMAKE_LINKER should hopefully still be tweakable
post-platform-setup and do the right thing.

For linker flags, perhaps
CMAKE_EXE_LINKER_FLAGS
CMAKE_SHARED_LINKER_FLAGS
CMAKE_MODULE_LINKER_FLAGS
would be useful (but since you primarily want to change the linker binary
perhaps you won't need these).

OTOH your issue might be the split between Fortran and C++ components,
in which case even CMAKE_LINKER might fail to help in all cases
(in that case perhaps there's a target-specific property to set
which defines the linker to use for the target).

HTH,

Andreas Mohr


More information about the CMake mailing list