@@ -84,7 +84,7 @@ subroutine add_dependencies(dependency_list)
84
84
character (:), allocatable :: dependency_path
85
85
86
86
do i= 1 ,size (dependency_list)
87
-
87
+
88
88
if (dependency_list(i)% name .in . package_list) then
89
89
cycle
90
90
end if
@@ -99,7 +99,7 @@ subroutine add_dependencies(dependency_list)
99
99
end if
100
100
101
101
else if (allocated (dependency_list(i)% path)) then
102
-
102
+
103
103
dependency_path = join_path(package_root,dependency_list(i)% path)
104
104
105
105
end if
@@ -120,11 +120,11 @@ subroutine add_dependencies(dependency_list)
120
120
dependency% library% source_dir = " src"
121
121
end if
122
122
123
-
123
+
124
124
call add_libsources_from_package(sources,link_libraries,package_list,dependency, &
125
125
package_root= dependency_path, &
126
126
dev_depends= .false. , error= error)
127
-
127
+
128
128
if (allocated (error)) then
129
129
error% message = ' Error while processing sources for dependency package "' // &
130
130
new_line(' a' )// dependency% name// ' "' // &
@@ -322,7 +322,7 @@ subroutine cmd_run(settings,test)
322
322
exe_source = > exe_target% dependencies(1 )% ptr% source
323
323
324
324
if (exe_source% unit_scope == &
325
- merge (FPM_SCOPE_TEST,FPM_SCOPE_APP,test)) then
325
+ merge (FPM_SCOPE_TEST,FPM_SCOPE_APP,test)) then
326
326
327
327
col_width = max (col_width,len (basename(exe_target% output_file))+ 2 )
328
328
@@ -336,7 +336,7 @@ subroutine cmd_run(settings,test)
336
336
do j= 1 ,size (settings% name)
337
337
338
338
if (trim (settings% name (j))==exe_source% exe_name) then
339
-
339
+
340
340
found(j) = .true.
341
341
exe_cmd% s = exe_target% output_file
342
342
executables = [executables, exe_cmd]
@@ -346,7 +346,7 @@ subroutine cmd_run(settings,test)
346
346
end do
347
347
348
348
end if
349
-
349
+
350
350
end if
351
351
352
352
end if
@@ -379,14 +379,14 @@ subroutine cmd_run(settings,test)
379
379
do i= 1 ,size (model% targets)
380
380
381
381
exe_target = > model% targets(i)% ptr
382
-
382
+
383
383
if (exe_target% target_type == FPM_TARGET_EXECUTABLE .and. &
384
384
allocated (exe_target% dependencies)) then
385
385
386
386
exe_source = > exe_target% dependencies(1 )% ptr% source
387
387
388
388
if (exe_source% unit_scope == &
389
- merge (FPM_SCOPE_TEST,FPM_SCOPE_APP,test)) then
389
+ merge (FPM_SCOPE_TEST,FPM_SCOPE_APP,test)) then
390
390
391
391
write (stderr,' (A)' ,advance= (merge (" yes" ," no " ,modulo (j,nCol)==0 ))) &
392
392
& [character (len= col_width) :: basename(exe_target% output_file)]
@@ -415,9 +415,13 @@ subroutine cmd_run(settings,test)
415
415
if (settings% list) then
416
416
write (stderr,* ) executables(i)% s
417
417
else
418
-
418
+
419
419
if (exists(executables(i)% s)) then
420
- call run(executables(i)% s// " " // settings% args)
420
+ if (settings% runner .ne. ' ' )then
421
+ call run(settings% runner// ' ' // executables(i)% s// " " // settings% args)
422
+ else
423
+ call run(executables(i)% s// " " // settings% args)
424
+ endif
421
425
else
422
426
write (stderr,* )' fpm::run<ERROR>' ,executables(i)% s,' not found'
423
427
stop 1
0 commit comments