Skip to content

Commit 40b7888

Browse files
committed
add runner_args to cli
1 parent 32875ce commit 40b7888

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/fpm_command_line.f90

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ module fpm_command_line
9090
character(len=ibug),allocatable :: name(:)
9191
character(len=:),allocatable :: args
9292
character(len=:),allocatable :: runner
93+
character(len=:),allocatable :: runner_args
9394
logical :: example
9495
end type
9596

@@ -141,7 +142,7 @@ module fpm_command_line
141142
& 'test', 'runner', 'install', 'update', 'list', 'help', 'version', 'publish' ]
142143

143144
character(len=:), allocatable :: val_runner, val_compiler, val_flag, val_cflag, val_cxxflag, val_ldflag, &
144-
val_profile
145+
val_profile, val_runner_args
145146

146147
! '12345678901234567890123456789012345678901234567890123456789012345678901234567890',&
147148
character(len=80), parameter :: help_text_build_common(*) = [character(len=80) :: &
@@ -268,7 +269,8 @@ subroutine get_command_line_settings(cmd_settings)
268269
run_args = &
269270
' --target " "' // &
270271
' --list F' // &
271-
' --runner " "'
272+
' --runner " "'// &
273+
' --runner-args " "'
272274

273275
compiler_args = &
274276
' --profile " "' // &
@@ -322,7 +324,8 @@ subroutine get_command_line_settings(cmd_settings)
322324
archiver = sget('archiver')
323325
allocate(fpm_run_settings :: cmd_settings)
324326
val_runner=sget('runner')
325-
if(specified('runner') .and. val_runner=='')val_runner='echo'
327+
val_runner_args=sget('runner-args')
328+
if (specified('runner') .and. val_runner=='')val_runner='echo'
326329
cmd_settings=fpm_run_settings(&
327330
& args=remaining,&
328331
& profile=val_profile,&
@@ -340,6 +343,7 @@ subroutine get_command_line_settings(cmd_settings)
340343
& build_tests=.false.,&
341344
& name=names,&
342345
& runner=val_runner,&
346+
& runner_args=val_runner_args,&
343347
& verbose=lget('verbose') )
344348

345349
case('build')
@@ -571,6 +575,7 @@ subroutine get_command_line_settings(cmd_settings)
571575
allocate(fpm_test_settings :: cmd_settings)
572576
val_runner=sget('runner')
573577
if(specified('runner') .and. val_runner=='')val_runner='echo'
578+
val_runner_args=sget('runner-args')
574579
cmd_settings=fpm_test_settings(&
575580
& args=remaining, &
576581
& profile=val_profile, &
@@ -588,6 +593,7 @@ subroutine get_command_line_settings(cmd_settings)
588593
& build_tests=.true., &
589594
& name=names, &
590595
& runner=val_runner, &
596+
& runner_args=val_runner_args, &
591597
& verbose=lget('verbose') )
592598

593599
case('update')

0 commit comments

Comments
 (0)