File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,8 @@ module fpm_command_line
92
92
character (len= :),allocatable :: runner
93
93
character (len= :),allocatable :: runner_args
94
94
logical :: example
95
+ contains
96
+ procedure :: runner_command
95
97
end type
96
98
97
99
type, extends(fpm_run_settings) :: fpm_test_settings
@@ -1436,4 +1438,21 @@ function get_fpm_env(env, default) result(val)
1436
1438
val = get_env(fpm_prefix// env, default)
1437
1439
end function get_fpm_env
1438
1440
1441
+ ! > Build a full runner command (executable + command-line arguments)
1442
+ function runner_command (cmd ) result(run_cmd)
1443
+ class(fpm_run_settings), intent (in ) :: cmd
1444
+ character (len= :), allocatable :: run_cmd
1445
+
1446
+ ! > Get executable
1447
+ if (len_trim (cmd% runner)>0 ) then
1448
+ run_cmd = trim (cmd% runner)
1449
+ else
1450
+ run_cmd = ' '
1451
+ end if
1452
+
1453
+ ! > Append command-line arguments
1454
+ if (len_trim (cmd% runner_args)>0 ) run_cmd = run_cmd// ' ' // trim (cmd% runner_args)
1455
+
1456
+ end function runner_command
1457
+
1439
1458
end module fpm_command_line
You can’t perform that action at this time.
0 commit comments