Skip to content

Commit

Permalink
Compilation passed by Gfortran
Browse files Browse the repository at this point in the history
  • Loading branch information
crazyzlj committed Aug 1, 2023
1 parent 283b30c commit db67f30
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/header.f
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit db67f30

Please sign in to comment.