Re: [CMake] Fortran MinGW on Windows

2013-06-04 Thread Leek, Jim
* 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. Sheesh, I spent a bunch of time on a reproducer, but it doesn't build on Linux either. My guess is

Re: [CMake] Fortran MinGW on Windows

2013-06-03 Thread Brad King
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

[CMake] Fortran MinGW on Windows

2013-05-31 Thread Leek, Jim
Hi, I recently rebuilt an old build system with cmake. It works well on Linux, but part of the idea of using cmake was to make it more portable. Now I'm working on the Windows port, but I'm having issues with the Fortran libraries. The program itself is C++, but it has a number of optional

Re: [CMake] Fortran MinGW on Windows

2013-05-31 Thread Arjen Markus
Hi Jim, I do not quite know why this works fine on Linux, but the issue is caused by the C++ part of the link step. As you are using g++ to link all the C++ runtime libraries, you need to tell it what Fortran runtime libraries to add. Linking with gfortran automatically ensures all these

Re: [CMake] Fortran MinGW on Windows

2013-05-31 Thread Leek, Jim
- From: Arjen Markus [mailto:arjen.mar...@deltares.nl] Sent: Friday, May 31, 2013 1:03 AM To: Leek, Jim; cmake@cmake.org Subject: Re: [CMake] Fortran MinGW on Windows Hi Jim, I do not quite know why this works fine on Linux, but the issue is caused by the C++ part of the link step. As you

Re: [CMake] Fortran MinGW on Windows

2013-05-31 Thread Leek, Jim
] Sent: Friday, May 31, 2013 01:03 AM To: Leek, Jim; cmake@cmake.org cmake@cmake.org Subject: Re: [CMake] Fortran MinGW on Windows Hi Jim, I do not quite know why this works fine on Linux, but the issue is caused by the C++ part of the link step. As you are using g++ to link all the C++ runtime

Re: [CMake] Fortran MinGW on Windows

2013-05-31 Thread Arjen Markus
On Fri, 31 May 2013 09:47:47 + Leek, Jim le...@llnl.gov wrote: Oh, if there any cmake way to get the fortran link flags I need to pass to g++? I know -lgfortran is all I need in this case, but if there was a generic way to get cmake to figure it out for me, that would be nice. I am

Re: [CMake] Fortran MinGW on Windows

2013-05-31 Thread Brad King
On 05/31/2013 05:47 AM, Leek, Jim wrote: Oh, if there any cmake way to get the fortran link flags I need to pass to g++? I know -lgfortran is all I need in this case, but if there was a generic way to get cmake to figure it out for me, that would be nice. CMake is supposed to figure this out

Re: [CMake] Fortran MinGW on Windows

2013-05-31 Thread Alain Leblanc
What happens when enable_language(Fortran) is invoked and CMake can not find the gfortran shared libraries? Would an error message be issued?(Of course I could just write a test case.) I'm asking because I'm using a couple of Fortran programs in a big C++ project, and I don't use

Re: [CMake] Fortran MinGW on Windows

2013-05-31 Thread Brad King
On 05/31/2013 01:35 PM, Alain Leblanc wrote: What happens when enable_language(Fortran) is invoked and CMake can not find the gfortran shared libraries? CMake does not actually search for the libraries. It runs the Fortran compiler front-end to build a test executable and passes options to ask

Re: [CMake] Fortran MinGW on Windows

2013-05-31 Thread Leek, Jim
* What version of CMake are you using? 2.8.11 * What generator are you using? MinGW Makefiles * What is in the CMakeFiles/*/CMake*Compiler.cmake files for values like CMAKE_C_IMPLICIT_LINK_LIBRARIES? CmakeCCompiler.cmake: set(CMAKE_C_IMPLICIT_LINK_LIBRARIES