Skip to content

Commit 5bb77c0

Browse files
authored
Merge pull request #1005 from AnonMiraj/main
fix issue #375 : a small qol change
2 parents b19c29a + 1fc35f9 commit 5bb77c0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/fpm.f90

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ subroutine cmd_run(settings,test)
511511
! Enumerate executable targets to run
512512
col_width = -1
513513
found(:) = .false.
514-
allocate(executables(0))
514+
allocate(executables(size(settings%name)))
515515
do i=1,size(targets)
516516

517517
exe_target => targets(i)%ptr
@@ -534,11 +534,12 @@ subroutine cmd_run(settings,test)
534534

535535
do j=1,size(settings%name)
536536

537-
if (glob(trim(exe_source%exe_name),trim(settings%name(j)))) then
537+
if (glob(trim(exe_source%exe_name),trim(settings%name(j))) .and. .not.found(j)) then
538+
538539

539540
found(j) = .true.
540541
exe_cmd%s = exe_target%output_file
541-
executables = [executables, exe_cmd]
542+
executables(j) = exe_cmd
542543

543544
end if
544545

0 commit comments

Comments
 (0)