summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler/Cray-Fortran.cmake
diff options
context:
space:
mode:
authorPeter Hill <zed.three@gmail.com>2020-04-24 10:52:41 (GMT)
committerBrad King <brad.king@kitware.com>2020-05-21 15:44:14 (GMT)
commitb0a6161190f8a85a5771fc96d5d745b0be2b07e5 (patch)
treed5fc83aa6c54f699239e4c5739eb4218e83dc720 /Modules/Compiler/Cray-Fortran.cmake
parentd3d53eefeeea5d3cf853f4591e318f3e4998bec0 (diff)
downloadCMake-b0a6161190f8a85a5771fc96d5d745b0be2b07e5.zip
CMake-b0a6161190f8a85a5771fc96d5d745b0be2b07e5.tar.gz
CMake-b0a6161190f8a85a5771fc96d5d745b0be2b07e5.tar.bz2
Fortran: Add Fortran_PREPROCESS property
Issue: #18870
Diffstat (limited to 'Modules/Compiler/Cray-Fortran.cmake')
-rw-r--r--Modules/Compiler/Cray-Fortran.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/Compiler/Cray-Fortran.cmake b/Modules/Compiler/Cray-Fortran.cmake
index ccb7c2e..696ae76 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()