Skip to content
  • Brad King's avatar
    Fortran: Use module dir flag if needed for default module directory · 7b5f8567
    Brad King authored
    Our buildsystem model says that the default Fortran module output
    directory is the build tree directory corresponding to the source tree
    `CMakeLists.txt` file adding the current target.  Extend
    `cmGeneratorTarget::GetFortranModuleDirectory` to allow generators to
    pass in the compiler working directory.  If the working directory does
    not match the default Fortran module output directory then we need an
    explicit module directory flag (e.g. `-J`) to tell the compiler to
    put/use modules in the latter.
    
    This does not affect the Makefile generator but will be useful for
    future introduction of Fortran support to the Ninja generator.
    7b5f8567