diff options
author | Brad King <brad.king@kitware.com> | 2021-03-05 13:08:16 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-03-05 13:11:05 (GMT) |
commit | ef513fe3d1d864d865d7143699834228988a7cd7 (patch) | |
tree | 8c9975951673ad29b463c8bdcd41d394d363f05d | |
parent | 12a139f2b6610e688be3d2bd317d46f0ce6ddf1f (diff) | |
download | CMake-ef513fe3d1d864d865d7143699834228988a7cd7.zip CMake-ef513fe3d1d864d865d7143699834228988a7cd7.tar.gz CMake-ef513fe3d1d864d865d7143699834228988a7cd7.tar.bz2 |
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
-rw-r--r-- | Modules/Compiler/Cray-Fortran.cmake | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/Compiler/Cray-Fortran.cmake b/Modules/Compiler/Cray-Fortran.cmake index 696ae76..0d5e1c7 100644 --- a/Modules/Compiler/Cray-Fortran.cmake +++ b/Modules/Compiler/Cray-Fortran.cmake @@ -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() |