summaryrefslogtreecommitdiff
path: root/Modules/Compiler
diff options
context:
space:
mode:
authormakise-homura <akemi_homura@kurisa.ch>2023-02-16 03:55:31 +0300
committermakise-homura <akemi_homura@kurisa.ch>2023-02-16 03:55:31 +0300
commit9f9d121ddb75e480660976555791e2cf3b61b1c9 (patch)
tree2d996a137c4b69b708046a70169c9e857ca63dce /Modules/Compiler
parentea5f1f33fd5986a7858fa064cd747e09d372c63d (diff)
downloadcmake-9f9d121ddb75e480660976555791e2cf3b61b1c9.tar.gz
LCC: Disable Fortran preprocessor testing if unsupported
LCC < 1.24 has no way to disable integrated Fortran preprocessor, and it can't produce preprocessed files explicitly. So we disable all functionality (and therefore tests) related to it.
Diffstat (limited to 'Modules/Compiler')
-rw-r--r--Modules/Compiler/LCC-Fortran.cmake7
1 files changed, 5 insertions, 2 deletions
diff --git a/Modules/Compiler/LCC-Fortran.cmake b/Modules/Compiler/LCC-Fortran.cmake
index 8091b29949..2d82ea8063 100644
--- a/Modules/Compiler/LCC-Fortran.cmake
+++ b/Modules/Compiler/LCC-Fortran.cmake
@@ -10,8 +10,11 @@ set(CMAKE_Fortran_PREPROCESS_SOURCE
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-ffixed-form")
set(CMAKE_Fortran_FORMAT_FREE_FLAG "-ffree-form")
-set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_ON "-cpp")
-set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_OFF "-nocpp")
+# LCC < 1.24.00 has a broken Fortran preprocessor
+if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL "1.24.00")
+ set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_ON "-cpp")
+ set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_OFF "-nocpp")
+endif()
set(CMAKE_Fortran_POSTPROCESS_FLAG "-fpreprocessed")