[CMake] F90 and legacy F77

Brad King brad.king at kitware.com
Thu Aug 20 10:54:00 EDT 2009


Arjen Markus wrote:
> I do not think this is going to work: object files created with g77
> and gfortran are not compatible as far as I know.
> 
> What constructs are they? F90/95 has one or two deleted features
> but most compilers will simply accept them, perhaps grudgingly.
[snip]
>> How can this be done with CMake?
>>
>> For example:
>>     foo.f   <-- F77 file
>>     bar.f90  <-- F90 file
>>
>> I want something equivalent to
>>     g77 foo.f -o foo.o
>>     gfotran bar.f90 foo.o -o executable.x

As Arjen asked, what is your actual use case?
What are the real compiler you're using (and versions)?
Does it work when invoking the compilers by hand?
Are there compatibility flags to the f90 compiler to tell
it to accept f77 constructs?

-Brad


More information about the CMake mailing list