[CMake] Fortran MinGW on Windows

Brad King brad.king at kitware.com
Mon Jun 3 08:43:45 EDT 2013


On 05/31/2013 04:49 PM, Leek, Jim wrote:
> CmakeCXXCompiler.cmake:
> set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;mingw32;moldname;mingwex;msvcrt;advapi32;shell32;user32;kernel32;mingw32;moldname;mingwex;msvcrt")
> 
> CmakeFortranCompiler.cmake:
> set(CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES "gfortran;mingw32;moldname;mingwex;msvcrt;quadmath;m;mingw32;moldname;mingwex;msvcrt;advapi32;shell32;user32;kernel32;mingw32;moldname;mingwex;msvcrt")

This means CMake is correctly detecting the implicit libraries for
C, C++, and Fortran.  If both the Fortran library and C++ executable
are built by CMake in the same project it is expected that -lgfortran
will be generated on the link line.

> * Can you post a complete source example where it fails?
> 
> What would you like exactly?  Do you want me to make a reproducer?

Ideally we'd like a minimal example that re-produces the failure.

Thanks,
-Brad


More information about the CMake mailing list