Skip to content

Commit 9fdc865

Browse files
committed
add caf case to fpm_compiler.f90; debug mingw help_test.f90
1 parent ee20bf1 commit 9fdc865

File tree

2 files changed

+31
-5
lines changed

2 files changed

+31
-5
lines changed

fpm/src/fpm_compiler.f90

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,28 @@ subroutine add_compile_flag_defaults(build_name,compiler,model)
4343

4444
select case(build_name//'_'//compiler)
4545

46+
case('release_caf')
47+
module_path_switch='-J '
48+
fflags='&
49+
& -O3&
50+
& -Wimplicit-interface&
51+
& -fPIC&
52+
& -fmax-errors=1&
53+
& -ffast-math&
54+
& -funroll-loops&
55+
&'
56+
case('debug_caf')
57+
module_path_switch='-J '
58+
fflags = '&
59+
& -Wall&
60+
& -Wextra&
61+
& -Wimplicit-interface&
62+
& -fPIC -fmax-errors=1&
63+
& -g&
64+
& -fbounds-check&
65+
& -fcheck-array-temporaries&
66+
& -fbacktrace&
67+
&'
4668
case('release_gfortran')
4769
module_path_switch='-J '
4870
fflags='&

fpm/test/help_test/help_test.f90

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
program help_test
22
use,intrinsic :: iso_fortran_env, only : stdin=>input_unit, stdout=>output_unit, stderr=>error_unit
33
implicit none
4-
integer :: i
4+
integer :: i, j
55
integer :: be, af
66
character(len=:),allocatable :: path
77
integer :: estat, cstat
@@ -54,13 +54,17 @@ program help_test
5454
endif
5555
!!write(*,*)findloc(page1,'NAME').eq.1
5656
be=count(.not.tally)
57-
tally=[tally,merge(.true.,.false.,count(page1.eq.'NAME').eq.1)]
58-
tally=[tally,merge(.true.,.false.,count(page1.eq.'SYNOPSIS').eq.1)]
59-
tally=[tally,merge(.true.,.false.,count(page1.eq.'DESCRIPTION').eq.1)]
57+
tally=[tally,count(page1.eq.'NAME').eq.1]
58+
tally=[tally,count(page1.eq.'SYNOPSIS').eq.1]
59+
tally=[tally,count(page1.eq.'DESCRIPTION').eq.1]
6060
af=count(.not.tally)
6161
if(be.ne.af)then
6262
write(*,*)'<ERROR>missing expected sections in ',names(i)
63-
write(*,'(a)')page1
63+
write(*,*)page1(1) ! assuming at least size 1 for debugging mingw
64+
write(*,*)count(page1.eq.'NAME')
65+
write(*,*)count(page1.eq.'SYNOPSIS')
66+
write(*,*)count(page1.eq.'DESCRIPTION')
67+
write(*,'(a)')(trim(page1(j)),j=1,size(page1))
6468
endif
6569
write(*,*)'<INFO>have completed ',count(tally),' tests'
6670
call wipe('fpm_scratch_help.txt')

0 commit comments

Comments
 (0)