Cray: Enable explicit Fortran preprocessing for Ninja generator

Cray 11.0 adds support for preprocessing with output written to a
specified file (instead of always next to the source).  Use it to
enable Cray Fortran with the Ninja generator.

Patch-by: James Elliott
Fixes: #20731
This commit is contained in:
Brad King 2021-03-05 08:08:16 -05:00
parent 12a139f2b6
commit ef513fe3d1

View File

@ -19,3 +19,7 @@ else()
set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_ON "-eZ")
set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_OFF "-dZ")
endif()
if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 11.0)
set(CMAKE_Fortran_PREPROCESS_SOURCE "<CMAKE_Fortran_COMPILER> -o <PREPROCESSED_SOURCE> <DEFINES> <INCLUDES> <FLAGS> -eP <SOURCE>")
endif()