From 1580ba4097df02aa9584c714d04251be9fcc0b06 Mon Sep 17 00:00:00 2001 From: pardallio Date: Fri, 24 Apr 2026 12:22:17 +0000 Subject: [PATCH 1/2] adds check for intel version to add -recursive flag --- cmake/field_api_compile_options.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/field_api_compile_options.cmake b/cmake/field_api_compile_options.cmake index e1e3aefd..797815b1 100644 --- a/cmake/field_api_compile_options.cmake +++ b/cmake/field_api_compile_options.cmake @@ -20,4 +20,8 @@ endif () if(CMAKE_Fortran_COMPILER_ID MATCHES Intel) ecbuild_add_fortran_flags("-check nocontiguous" BUILD DEBUG) + if (CMAKE_Fortran_COMPILER_VERSION VERSION_LESS "20.0") + message(STATUS "Adding -recursive for Intel Fortran < 20") + add_compile_options($<$:-recursive>) + endif() endif() From a5db38b99de00ed45917446224a0d959bb01cf39 Mon Sep 17 00:00:00 2001 From: pardallio Date: Fri, 24 Apr 2026 12:30:31 +0000 Subject: [PATCH 2/2] changes flag adding routine --- cmake/field_api_compile_options.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/field_api_compile_options.cmake b/cmake/field_api_compile_options.cmake index 797815b1..5f8761e7 100644 --- a/cmake/field_api_compile_options.cmake +++ b/cmake/field_api_compile_options.cmake @@ -22,6 +22,6 @@ if(CMAKE_Fortran_COMPILER_ID MATCHES Intel) ecbuild_add_fortran_flags("-check nocontiguous" BUILD DEBUG) if (CMAKE_Fortran_COMPILER_VERSION VERSION_LESS "20.0") message(STATUS "Adding -recursive for Intel Fortran < 20") - add_compile_options($<$:-recursive>) + ecbuild_add_fortran_flags("-recursive") endif() endif()