Fortran: Intel ifx vs. gfortran rebuild capabilities
I did a quick search of issues and couldn't find anything with "Intel fortran rebuild," but I'm guessing the CMake devs know why this happens, and I do apologize if this is well explained in another issue.
If I do nothing other than touch
a Fortran source file that has an interface defined and produces a module file, CMake does an excellent job of minimizing what it builds--basically just relinking what it has to in mere seconds, which is wonderful. This is true when using gfortran
with both Unix Makefiles
and Ninja
--great!
Unfortunately, the team I support likes to use compilers like Intel and XL. I know this efficient rebuild behavior is not preserved when using Intel
compilers--it appears the assumption is made that the interface has changed regardless of the true nature of the change to the Fortran source file, and a massive recompile of the source can follow.
My question is this: how much work would it be to add support for this efficiency behavior for another compiler like Intel? Is it a super-complicated parsing of binary module files, or is the task reasonably doable with tests in place for gfortran
that we could adapt/parametrize for use with other compilers too?