[CMake] F90 and legacy F77

James C. Sutherland James.Sutherland at utah.edu
Tue Aug 18 17:39:14 EDT 2009


Is there a way to detect and use both F77 and F90 compilers?

I have some legacy F77 code that uses constructs that have been  
deprecated/removed in F90.  I would like to compile those F77 files  
with a F77 compiler, compile the F90 files with an F90 compiler, and  
then link them with the F90 compiler.

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



More information about the CMake mailing list