NAG-Fortran: Preprocessing upper-case extensions
The NAG Fortran compiler does not preprocess upper-case extensions by default on case-insensitive filesystems even though the build system passes a case-preserved file name. As of CMake 3.29, we hard-code -fpp
in CMAKE_Fortran_COMPILE_OBJECT
on Apple platforms in order to get preprocessing. However, that does not work for projects that set Fortran_PREPROCESS
to OFF. It also interferes with the Ninja generator's separate preprocessing and compilation steps.
Fixing this fully may require upstream NAG Fortran to gain options to infer preprocessing of upper-case sources (e.g., -cpp-infer
), and an option to explicitly turn off preprocessing (e.g., -no-cpp
). This issue tracks the problem on the CMake side.