summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-12-07 15:36:53 (GMT)
committerBrad King <brad.king@kitware.com>2023-12-07 15:49:25 (GMT)
commit7170b9cf45292592b4fcdbb259af0faf061e5533 (patch)
tree3d74380094cf911717532a181fb3a8975e9c6724
parent30ab0f576f517ff6992f314cca05fcc30b86271f (diff)
downloadCMake-7170b9cf45292592b4fcdbb259af0faf061e5533.zip
CMake-7170b9cf45292592b4fcdbb259af0faf061e5533.tar.gz
CMake-7170b9cf45292592b4fcdbb259af0faf061e5533.tar.bz2
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.
-rw-r--r--Tests/RunCMake/try_run/RunCMakeTest.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Tests/RunCMake/try_run/RunCMakeTest.cmake b/Tests/RunCMake/try_run/RunCMakeTest.cmake
index b81c1ed..7e9b2d1 100644
--- a/Tests/RunCMake/try_run/RunCMakeTest.cmake
+++ b/Tests/RunCMake/try_run/RunCMakeTest.cmake
@@ -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()