[CMake] Mixing C++ and Fortran

Andrew Brydon abrydon at lanl.gov
Tue Jan 29 12:19:37 EST 2008


Hi,
	I am dealing with a similar situation, and use the attached file.

Tested with gnu fortran and absoft, but i believe adding other  
combinations to the
KNOWN_FORTRAN_LIBRARIES
variable should help.

any feedback or suggestions welcomed

Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FortranLibraries.cmake
Type: application/octet-stream
Size: 3860 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/cmake/attachments/20080129/d22181af/FortranLibraries.obj
-------------- next part --------------


On Jan 29, 2008, at 10:13 AM, Honest Guvnor wrote:

> On Jan 29, 2008 3:33 PM, Bill Hoffman <bill.hoffman at kitware.com>  
> wrote:
>
>> Well, you are sort of stuck...
>
> That is  surprising. The combination of C++ (GUI) and Fortran
> (science/engineering number crunching) is going to be a common one and
> I had assumed I was doing something wrong.
>
> Is there no cmake variable for the fortran library I can add to the
> list of what to link?
>
>> You might be able to put the fortran stuff in a shared library and  
>> have
>> the fortran runtime pulled in that way.
>
> Perhaps but a number of tools/problems push us towards using static
> libraries at least when developing.
>
>>  You could write some fancy
>> find_* fortran stuff using try-compile that finds out the fortran run
>> time library.
>
> If this is what is required has nobody done it years ago?
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake



More information about the CMake mailing list