NAG-Fortran: Fix compilation flags and improve compatibility with Ninja
Fixes:
- The configuration of the NAG Fortran compiler missed the standard flags for debug, release and the other build types.
-
CMAKE_Fortran_PREPROCESS_SOURCEvariable was missing, causing the configuration using the Ninja generator to fail. - The
-fppflag was added by default on Apple due to its case-insensitive file system. If we use the ninja without settingCMAKE_Fortran_PREPROCESS=OFF, we already preprocess the files before compiling them. Compiling already preprocessed files again with the-fppcauses problems for the NAG Fortran compiler. - The
CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGSis now correctly passing the-bundleflag to the underlying host compiler. Before, it was passed directly to the NAG Fortran compiler, which doesn't support this flag.
Fixes: #21398 (closed)
Issue: #25900
Topic-rename: nag-fortran-ninja
Edited by Brad King