[CMake] incremental build slow because of F90 (cmake_copy_f90_mod)

Brad King brad.king at kitware.com
Mon Jul 12 13:16:05 EDT 2010


On 07/12/2010 07:51 AM, Verweij, Arjen wrote:
> We’re finding incremental builds to be slow, because the F90 source
> seems to be privy to a processing step known as “cmake_copy_f90_mod”.
> 
> While cmake and the compiler race through C/CXX/Fortran(77) source, this
> is not the case for F90. What does “cmake_copy_f90_mod” do? I can hardly
> find any documentation for it J
> 
> Are there workarounds that may decrease time spent in this area during
> incremental compiles?

Actually the copy-f90-mod step is a *feature* to make incremental
rebuilds faster.  It is an optimization for the case that the .f90
source file that provides a module gets recompiled but the *interface*
to the module does not change.  Many compilers update the timestamp
on the .mod file anyway.  In this case we do not want all the sources
that use the module to recompile needlessly.  The copy-f90-mod step
copies the .mod file to a module timestamp file in a way that does
not modify the timestamp unless the module really changed.

-Brad


More information about the CMake mailing list