[CMake] ifort link with -static-intel

Benne, Kyle Kyle.Benne at nrel.gov
Mon Mar 23 22:56:14 EDT 2009


Hello All,

I have been experimenting with CMake to compile a large Fortran project with the Intel Fortran compiler ifort.  I am having trouble getting the executable to link with the static intel libraries, because CMake is adding the linker flag "i_dynamic" and it is overriding my --static-intel option.  

I believe the i_dynamic flag is coming from SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "-i_dynamic") in the Linux-Intel-Fortran module.  In fact when I set CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS to an empty string in my CMakeLists file, everything works as I expect.  I have one ADD_EXECUTABLE statement in my project.  There are no libraries so why am I getting the i_dynamic flag?

Kind Regards,

Kyle


More information about the CMake mailing list