Tests: Fix RunCMake.try_run case on gfortran < 4.3

Since commit 0f37000304 (try_{compile,run}: add LINKER_LANGUAGE option,
2023-10-12) the test has failed with gfortran < 4.3 because it does
not support the Fortran syntax used by the test.  Add a version check.
This commit is contained in:
Brad King
2023-12-07 10:36:53 -05:00
parent 30ab0f576f
commit 7170b9cf45

View File

@@ -33,6 +33,6 @@ endif()
if (CMAKE_SYSTEM_NAME MATCHES "^(Linux|Darwin|Windows)$" AND
CMAKE_CXX_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$" AND
CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU)$")
(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" AND CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 4.3))
run_cmake(LinkerLanguage)
endif()