[CMake] Fortran 90 Module Issues in CMake

Matthew Schuchard ms503 at gtri.gatech.edu
Fri Mar 2 10:53:06 EST 2012


>  I don't know the specifics of this case, but the only time we've ever had trouble with F90 modules is when we add a dependency and don't delete the build tree before trying to reconfigure.

>  We have several hundred modules, many in the same directory and many used across directories and don't have any issues with it. I know that's not super helpful to hear when you have an issue, but the dependency scanner does seem to work.

>  Have you tried wiping out the entire build tree and trying again?

>  Tim

I just tried blowing it away, reconfiguring, and building, and actually the results are even worse now.
So actually there were many files as part of add_library.
e.g. add_library(target foo1.f90 foo2.f90 foo3.f90 foo4.f90)

Before blowing away the build tree, CMake correctly identified foo1 as having the first necessary module to
be built, and built it before then attempting to build foo3.f90 before foo2.f90, where foo2.f90 builds a
module needed by foo3.f90.
Now, when attempting to build foo1.f90 first, gnumake throws the error:

make[2]: *** No rule to make target `dir/foo1.tmp.f.provides',
needed by `dir/CMakeFiles/target.a.dir/foo1.mod.proxy'.  Stop.

So that was actually a step backwards unluckily.



More information about the CMake mailing list