[cmake-developers] Fortran support for Ninja generator

Steven Vancoillie steven.vancoillie at teokem.lu.se
Tue Mar 24 05:08:35 EDT 2015


Dear all,

we have a large Fortran project which we build with cmake and I'm
interested in making the ninja generator work with Fortran. I found a
few short discussions of this on the mailing list, but since then
nothing has happened.

One mention was to use the -M* flags supported by gfortran, just as
with gcc. However, when I tried this approach I found out that the -M*
flag for gfortran seems buggy, it doesn't output the correct format
(e.g. the target given with -MT flag is just added instead of
overwriting the default target). So, my ninja build failed saying the
depfile format was wrong.

Alternatively someone proposed to have ninja use cmake-generated
dependencies. From what I can tell from the ninja documentation, would
this mean that the cmake executable needs to generate the depfile
instead of the compiler?

I'm willing to work on this, but so far my experience with the cmake
source code is very rudimentary. If someone can point me in the right
direction, or provide some input to get started, this would be greatly
appreciated.

Steven


More information about the cmake-developers mailing list