[CMake] LINKER_LANGUAGE Fortran C CXX project
Marie-Christine Vallet
mmvallet at ucdavis.edu
Tue Aug 7 17:40:24 EDT 2007
Alan W. Irwin wrote:
>
> PLplot used to have a library built from Fortran and C. It worked
> okay on
> Linux, but caused nothing but trouble on other platforms so we split the
> library into two libraries, one containing fortran objects and one
> containing
> C objects, and my life has been much more peaceful ever since.... :-)
>
> So if you cannot get a library with mixed Fortran and C++ objects to
> build
> properly, splitting it will work at least in the case where all Fortran
> code depends on C++ code or all C++ code depends on Fortran code. Of
> course,
> splitting a library is a bad idea if the resulting two libraries
> depend on
> each other so I don't recommend this course if you have both Fortran code
> depending on C++ code and C++ code depending on Fortran code in your
> library.
>
The problem with the code I have is that, in the c code we access memory
allocated by Fortran (functions and variables ) and I am not certain
that if we separate the libraries, it will work.
I actually have C++ code that depends on Fortran code that depend on C
code. So that would be 3 different libraries if I understood you
correctly.... It seems a bit complex (at least for me), but I don't
really have a choice since these programs are not mine and I am using
them to create a qt user interface. Therefore, I thought (or rather I
was told when I asked on the qt list ) that cmake could be the best
solution
Marie
More information about the CMake
mailing list