From b0a6161190f8a85a5771fc96d5d745b0be2b07e5 Mon Sep 17 00:00:00 2001 From: Peter Hill Date: Fri, 24 Apr 2020 11:52:41 +0100 Subject: Fortran: Add Fortran_PREPROCESS property Issue: #18870 --- Modules/Compiler/Cray-Fortran.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Modules/Compiler/Cray-Fortran.cmake') diff --git a/Modules/Compiler/Cray-Fortran.cmake b/Modules/Compiler/Cray-Fortran.cmake index ccb7c2ee5a..696ae76074 100644 --- a/Modules/Compiler/Cray-Fortran.cmake +++ b/Modules/Compiler/Cray-Fortran.cmake @@ -11,3 +11,11 @@ set(CMAKE_Fortran_MODDIR_FLAG -J) set(CMAKE_Fortran_MODDIR_DEFAULT .) set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-f fixed") set(CMAKE_Fortran_FORMAT_FREE_FLAG "-f free") + +if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 8.5) + set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_ON "-eT") + set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_OFF "-dT") +else() + set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_ON "-eZ") + set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_OFF "-dZ") +endif() -- cgit v1.2.1