summaryrefslogtreecommitdiff
path: root/Modules/Platform
diff options
context:
space:
mode:
authormakise-homura <akemi_homura@kurisa.ch>2023-02-16 00:05:16 +0300
committermakise-homura <akemi_homura@kurisa.ch>2023-02-16 00:05:16 +0300
commit5434547678223c79c18429f7b1c75d0634f60185 (patch)
tree1a9f10f1e94a4237ede937ced8318f1ae0c4abd6 /Modules/Platform
parent37f068083ba53e4140e5660a82bda9708e53c356 (diff)
downloadcmake-5434547678223c79c18429f7b1c75d0634f60185.tar.gz
LCC: Don't require liblfortran on lcc versions that don't have it
There wasn't a liblfortran library before 1.24 (actually 1.24.01), and it is replaced by libgfortran in 1.26.03 and later.
Diffstat (limited to 'Modules/Platform')
-rw-r--r--Modules/Platform/Linux-LCC-Fortran.cmake6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/Platform/Linux-LCC-Fortran.cmake b/Modules/Platform/Linux-LCC-Fortran.cmake
index bf2a1c2d68..166c06a44e 100644
--- a/Modules/Platform/Linux-LCC-Fortran.cmake
+++ b/Modules/Platform/Linux-LCC-Fortran.cmake
@@ -1,7 +1,7 @@
include(Platform/Linux-LCC)
__linux_compiler_lcc(Fortran)
-if (CMAKE_Fortran_COMPILER_VERSION VERSION_LESS "1.26.03")
- set(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "-llfortran")
-else()
+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")
endif()