[cmake] Avoid unnecessary rebuilds without fortran
When CMake doesn't detect Fortran, it writes an empty FC.h
file, which gets included by config.h
. This file is regenerated on each cmake run, causing continuous full rebuilds.
This merge requests fixes the issue by not rewriting the file if is already present.