From d5b1f7d28d942690a6db9d4c134bf865851c2c06 Mon Sep 17 00:00:00 2001 From: Jim Wittig Date: Tue, 6 Jan 2026 16:18:44 -0700 Subject: [PATCH 1/2] Change the intel fortran preprocessing order. This fixes a problem when using a macro in the invocation of another macro. This is only for the intel target when running gnu make. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ff75c6be6b..5a7cf5060a 100644 --- a/Makefile +++ b/Makefile @@ -663,11 +663,11 @@ intel: # BUILDTARGET Intel oneAPI Fortran, C, and C++ compiler suite "CC_SERIAL = icx" \ "CXX_SERIAL = icpx" \ "FFLAGS_PROMOTION = -real-size 64" \ - "FFLAGS_OPT = -O3 -convert big_endian -free -align array64byte" \ + "FFLAGS_OPT = -O3 -convert big_endian -free -align array64byte -Qoption,fpp,-macro_expand=vc" \ "CFLAGS_OPT = -O3" \ "CXXFLAGS_OPT = -O3" \ "LDFLAGS_OPT = -O3" \ - "FFLAGS_DEBUG = -g -convert big_endian -free -check bounds,pointers,arg_temp_created,format,shape,contiguous -fpe0 -traceback" \ + "FFLAGS_DEBUG = -g -convert big_endian -free -check bounds,pointers,arg_temp_created,format,shape,contiguous -fpe0 -traceback -Qoption,fpp,-macro_expand=vc" \ "CFLAGS_DEBUG = -g -traceback" \ "CXXFLAGS_DEBUG = -g -traceback" \ "LDFLAGS_DEBUG = -g -traceback" \ From f476e1c6323d18b20e5d96484129fc3fcfb0659c Mon Sep 17 00:00:00 2001 From: Jim Wittig Date: Tue, 6 Jan 2026 16:52:31 -0700 Subject: [PATCH 2/2] Change the intel fortran preprocessing order. This fixes a problem when using a macro in the invocation of another macro. This change is only when running cmake with an intel environment loaded. --- cmake/Functions/MPAS_Functions.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/Functions/MPAS_Functions.cmake b/cmake/Functions/MPAS_Functions.cmake index fe76556225..15d9f63fc1 100644 --- a/cmake/Functions/MPAS_Functions.cmake +++ b/cmake/Functions/MPAS_Functions.cmake @@ -121,6 +121,7 @@ function(mpas_fortran_target target) list(APPEND MPAS_FORTRAN_TARGET_COMPILE_OPTIONS_PUBLIC $<$:-align array64byte> $<$:-convert big_endian> + $<$:-Qoption,fpp,-macro_expand=vc> ) if(MPAS_DOUBLE_PRECISION) list(APPEND MPAS_FORTRAN_TARGET_COMPILE_OPTIONS_PRIVATE