From db67f301adf78574ff12dd0e1bfd37073e373ea7 Mon Sep 17 00:00:00 2001 From: Liang-Jun Zhu Date: Tue, 1 Aug 2023 21:08:12 +0800 Subject: [PATCH] Compilation passed by Gfortran --- src/CMakeLists.txt | 5 ++++- src/header.f | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 35c216b..75d18eb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -30,7 +30,7 @@ elseif(${CMAKE_Fortran_COMPILER_ID} STREQUAL "Flang") else() # gfortran tested only set(FLAG_L72 -ffixed-line-length-72) set(FLAG_L80 -ffixed-line-length-80) - set(FLAG_LLONG -ffree-line-length-none) + set(FLAG_LLONG -ffixed-line-length-none) endif() ## Special sources that have fixed length of 72 @@ -82,8 +82,11 @@ if((NOT MSVC) AND (${First_Line_Of_Main_File} MATCHES " include 'modparm.f' set(Format_Flag ${FLAG_LLONG}) endif() list(FIND LEN72_SRCS ${CORENAME} _FOUND_LEN72) + list(FIND LENLONG_SRCS ${CORENAME} _FOUND_LENLONG) if(${_FOUND_LEN72} GREATER -1) set(Format_Flag ${FLAG_L72}) + elseif(${_FOUND_LENLONG} GREATER -1) + set(Format_Flag ${FLAG_LLONG}) endif() add_custom_command(OUTPUT ${CORENAME}.o COMMAND ${CMAKE_Fortran_COMPILER} ${Compile_Flags_List} ${Format_Flag} -c diff --git a/src/header.f b/src/header.f index a0ea253..e0bb5b1 100644 --- a/src/header.f +++ b/src/header.f @@ -93,7 +93,7 @@ subroutine header & " WTMPdegc"," Salt1 "," Salt2 ", & " Salt3 "," Salt4 "," Salt5 ", & " Salt6 "," Salt7 "," Salt8 ", - & " Salt9 "," Salt10 "," SAR ", + & " Salt9 "," Salt10 "," SAR ", & " EC "/) !! numbers printed to VB interface reach output file