summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler/XL-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/XL-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/XL-Fortran.cmake')
-rw-r--r--Modules/Compiler/XL-Fortran.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/Compiler/XL-Fortran.cmake b/Modules/Compiler/XL-Fortran.cmake
index e01ec8e..cc15e65 100644
--- a/Modules/Compiler/XL-Fortran.cmake
+++ b/Modules/Compiler/XL-Fortran.cmake
@@ -23,3 +23,8 @@ set(CMAKE_Fortran_CREATE_ASSEMBLY_SOURCE)
set(CMAKE_Fortran_PREPROCESS_SOURCE
"<CMAKE_Fortran_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -qpreprocess -qnoobject -qsuppress=1517-020 -tF -B \"${CMAKE_CURRENT_LIST_DIR}/XL-Fortran/\" -WF,--cpp,\"${CMAKE_Fortran_XL_CPP}\",--out,<PREPROCESSED_SOURCE> <SOURCE>"
)
+
+if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 15.1.6)
+ set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_ON "-qpreprocess")
+ set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_OFF "-qnopreprocess")
+endif()