Files
CMake/Modules/Platform/Linux-LCC-Fortran.cmake
makise-homura 9f9d121ddb 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.
2023-02-16 03:55:31 +03:00

10 lines
383 B
CMake

include(Platform/Linux-LCC)
__linux_compiler_lcc(Fortran)
if (CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL "1.26.03")
set(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "-lgfortran")
elseif (CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL "1.24.01")
set(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "-llfortran")
else()
unset(CMAKE_Fortran_CREATE_PREPROCESSED_SOURCE)
endif()