• Yurii Batrak's avatar
    Makefiles: Avoid nested make calls for Fortran module dependencies · 5f2e2c38
    Yurii Batrak authored
    Makefiles generated by cmake use a series of nested calls to build
    `*.provides.build` targets that are used when the 'requires' step is
    needed.  That leads to significant degradation of the build time for
    incremental builds.  Re-arrange dependencies to eliminate the nested
    calls.
    
    Explicit `.mod.stamp` targets introduced by this commit could lead to
    situation when a stamp file always older than its dependency.  This
    happens during the incremental build when building of an updated Fortran
    source produces a module file that has no differences from the stored
    stamp file.  In such case `cmake_copy_f90_mod` will be triggered on each
    new build to compare a module file with the corresponding stamp file.
    This behavior is expected and can not be changed without nested calls
    that slow down the build.  The copy-if-different check is much cheaper
    than an entire nested make call.
    5f2e2c38
cmLocalUnixMakefileGenerator3.cxx 72.2 KB