From 7170b9cf45292592b4fcdbb259af0faf061e5533 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 7 Dec 2023 10:36:53 -0500 Subject: 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. --- Tests/RunCMake/try_run/RunCMakeTest.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() -- cgit v0.12