When CMake is used for a mixed language project (C/C++ and FORTRAN), the C++ compiler is called to link the executable. Is there an easy way to call the FORTRAN compiler for the linking step.
project(Serialbox_Fortran_Perturbation_Example CXX Fortran)
add_executable(main_producer main_producer.f90 m_ser.f90)
This will compile correctly with the FORTRAN compiler but for the linking step, the C++ compiler will be called and it causes trouble with some compiler suite like PGI for example.