[cmake-developers] Fortran support for Ninja generator

Nils Gladitz nilsgladitz at gmail.com
Tue Mar 24 05:46:34 EDT 2015


On 03/24/2015 10:08 AM, Steven Vancoillie wrote:
> 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.

I am not very familiar with fortran myself but there was this discussion 
on the ninja mailing list that implied that this might also require 
changes to ninja itself:

https://groups.google.com/d/msg/ninja-build/b1-AF3pRJuE/NkPDsO0C2IUJ

Nils


More information about the cmake-developers mailing list