Skip to content

Commit

Permalink
Merge pull request #35 from zbeekman/fix-GNU-define
Browse files Browse the repository at this point in the history
use __GFORTRAN__ rather than -DGNU
  • Loading branch information
szaghi committed Jun 26, 2015
2 parents ddcd2b4 + 4c2f39b commit 80061d4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions fobos
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ modes = shared-gnu static-gnu shared-gnu-debug static-gnu-debug
test-driver-string-gnu-coverage

[common-variables]
$CSHARED_GNU = -DGNU -cpp -c -fPIC -frealloc-lhs
$CSHARED_GNU = -cpp -c -fPIC -frealloc-lhs
$CSHARED_INT = -cpp -c -fpic -assume realloc_lhs
$LSHARED = -shared
$CSTATIC_GNU = -DGNU -cpp -c -frealloc-lhs
$CSTATIC_GNU = -cpp -c -frealloc-lhs
$CSTATIC_INT = -cpp -c -assume realloc_lhs
$DEBUG_GNU = -DGNU -O0 -g3 -Warray-bounds -Wcharacter-truncation -Wline-truncation -Wimplicit-interface -Wimplicit-procedure -Wunderflow -fcheck=all -fmodule-private -ffree-line-length-132 -fimplicit-none -fbacktrace -fdump-core -finit-real=nan -std=f2008 -fall-intrinsics
$DEBUG_GNU = -O0 -g3 -Warray-bounds -Wcharacter-truncation -Wline-truncation -Wimplicit-interface -Wimplicit-procedure -Wunderflow -fcheck=all -fmodule-private -ffree-line-length-132 -fimplicit-none -fbacktrace -fdump-core -finit-real=nan -std=f2008 -fall-intrinsics
$DEBUG_INT = -O0 -debug all -check all -warn all -extend-source 132 -traceback -gen-interfaces#-fpe-all=0 -fp-stack-check -fstack-protector-all -ftrapuv -no-ftz -std08
$OPTIMIZE = -O2

Expand Down
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ DMOD = Test_Driver/mod/
DEXE = Test_Driver/
LIBS =
FC = gfortran
OPTSC = -DGNU -cpp -c -frealloc-lhs -O2 -J Test_Driver/mod/
OPTSC = -cpp -c -frealloc-lhs -O2 -J Test_Driver/mod/
OPTSL = -J Test_Driver/mod/
VPATH = $(DSRC) $(DOBJ) $(DMOD)
MKDIRS = $(DOBJ) $(DMOD) $(DEXE)
Expand Down
10 changes: 5 additions & 5 deletions src/Data_Type_Command_Line_Interface.F90
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ module Data_Type_Command_Line_Interface
!< Command Line Interface (CLI).
private
type(Type_Command_Line_Arguments_Group), allocatable:: clasg(:) !< CLA list [1:Na].
#ifdef GNU
#ifdef __GFORTRAN__
character(100 ), allocatable:: args(:) !< Actually passed command line arguments.
character(100 ), allocatable:: examples(:) !< Examples of correct usage.
#else
Expand Down Expand Up @@ -1513,7 +1513,7 @@ pure subroutine init(cli,progname,version,help,description,license,authors,examp
cli%epilog = '' ; if (present(epilog )) cli%epilog = epilog
if (present(disable_hv)) cli%disable_hv = .true.
if (present(examples)) then
#ifdef GNU
#ifdef __GFORTRAN__
allocate(cli%examples(1:size(examples)))
#else
allocate(character(len=len(examples(1))):: cli%examples(1:size(examples))) ! does not work with gfortran 4.9.2
Expand Down Expand Up @@ -1989,7 +1989,7 @@ subroutine get_args_from_string(cli,args,ai)
integer(I4P):: a !< Counter for CLAs.
integer(I4P):: t !< Counter for tokens.
integer(I4P):: c !< Counter for characters inside tokens.
#ifndef GNU
#ifndef __GFORTRAN__
integer(I4P):: length !< Maxium lenght of arguments string.
#endif
!---------------------------------------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -2020,7 +2020,7 @@ subroutine get_args_from_string(cli,args,ai)

if (Na > 0) then
! allocate cli arguments list
#ifdef GNU
#ifdef __GFORTRAN__
allocate(cli%args(1:Na))
#else
length = 0
Expand Down Expand Up @@ -2097,7 +2097,7 @@ subroutine get_args_from_invocation(cli,ai)
if (allocated(cli%args)) deallocate(cli%args)
Na = command_argument_count()
if (Na > 0) then
#ifdef GNU
#ifdef __GFORTRAN__
allocate(cli%args(1:Na))
#else
aa = 0
Expand Down

0 comments on commit 80061d4

Please sign in to comment.