Re: [CMake] [CMake BUG] CMake (2.8.12.2) adding extraneous libraries at the end of the link command

2014-04-16 Thread Zaak Beekman
I have figured out what the link command should look like on Mac, in order that gfortran48 builds a mixed language (C Fortran, main program in Fortran) binary that is statically linked to all required gcc libraries. The link line should look like this: gfortran48 -static-libgfortran -lgfortran

Re: [CMake] [CMake BUG] CMake (2.8.12.2) adding extraneous libraries at the end of the link command

2014-04-15 Thread Brad King
On 04/14/2014 05:30 PM, Zaak Beekman wrote: The problem is that the link step adds spurious (intel) libraries when linking the executable. This is related to the mixed-language support, usually used for linking C++/Fortran together. When computing a link line CMake looks at all the languages

Re: [CMake] [CMake BUG] CMake (2.8.12.2) adding extraneous libraries at the end of the link command

2014-04-15 Thread Zaak Beekman
Brad, thanks so much for your help! From the online documentation it can be hard to figure out which variable/property controls certain features as someone with limited CMake experience. One strange detail I forgot was that this problem does not appear on Mac/OS X for the same project using the

Re: [CMake] [CMake BUG] CMake (2.8.12.2) adding extraneous libraries at the end of the link command

2014-04-15 Thread Zaak Beekman
I have a problem with the static build on Mac OS X using gcc and gfortran now, and I think the issue is with gfortran/Apple, not with CMake. (Things work fine with the intel compilers too.) However, on the off chance that someone has a fix or some advice I thought I would run the issue past all of

[CMake] [CMake BUG] CMake (2.8.12.2) adding extraneous libraries at the end of the link command

2014-04-14 Thread Zaak Beekman
I have a mixed language project, most of which is in Fortran, but some of it is in C. I have disabled C++ and enabled C and Fortran explicitly. I am using the 32 bit Intel composer XE 13.1.0 2013 compilers (on a Linux x86_64 RHEL 5 Linux machine) and I am building static executables so that they