Fortran: CMake 3.26.0 failing on lack of FortranModules.json for Ninja generator
Normally when we build programs, we link in libraries that depend on the fortran runtime, if a program itself does not have any fortran but links in those libraries, then the fortran compiler is needed to bring in the shared runtime.
Now, from my understanding of https://gitlab.kitware.com/cmake/cmake/-/blob/13810dee17794c5d57845e5a7a0b38b4204dd734/Source/cmGlobalNinjaGenerator.cxx the FortranModules.json file is generated IF there is fortran compiled by this project. In this fortran transitive dependency scenario, that FortranModules.json won't exist, and the build will fail when using Ninja.
I tested using GNU Make and it worked fine. Will attempt to test the main branch since I've seen more changes to the Fortran/Ninja generator.
Edited by Matias Lopez