diff options
author | makise-homura <akemi_homura@kurisa.ch> | 2023-02-16 00:55:31 (GMT) |
---|---|---|
committer | makise-homura <akemi_homura@kurisa.ch> | 2023-02-16 00:55:31 (GMT) |
commit | 9f9d121ddb75e480660976555791e2cf3b61b1c9 (patch) | |
tree | 2d996a137c4b69b708046a70169c9e857ca63dce /Modules/Compiler | |
parent | ea5f1f33fd5986a7858fa064cd747e09d372c63d (diff) | |
download | CMake-9f9d121ddb75e480660976555791e2cf3b61b1c9.zip CMake-9f9d121ddb75e480660976555791e2cf3b61b1c9.tar.gz CMake-9f9d121ddb75e480660976555791e2cf3b61b1c9.tar.bz2 |
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.cmake | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Modules/Compiler/LCC-Fortran.cmake b/Modules/Compiler/LCC-Fortran.cmake index 8091b29..2d82ea8 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") |