aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/fpm.f9013
1 files changed, 11 insertions, 2 deletions
diff --git a/src/fpm.f90 b/src/fpm.f90
index c670378..a80f1f6 100644
--- a/src/fpm.f90
+++ b/src/fpm.f90
@@ -423,11 +423,20 @@ subroutine cmd_run(settings,test)
do i=1,size(executables)
if (exists(executables(i)%s)) then
if(settings%runner .ne. ' ')then
- call run(settings%runner//' '//executables(i)%s//" "//settings%args, &
+ if(.not.allocated(settings%args))then
+ call run(settings%runner//' '//executables(i)%s, &
echo=settings%verbose, exitstat=stat(i))
+ else
+ call run(settings%runner//' '//executables(i)%s//" "//settings%args, &
+ echo=settings%verbose, exitstat=stat(i))
+ endif
else
- call run(executables(i)%s//" "//settings%args,echo=settings%verbose, &
+ if(.not.allocated(settings%args))then
+ call run(executables(i)%s,echo=settings%verbose, exitstat=stat(i))
+ else
+ call run(executables(i)%s//" "//settings%args,echo=settings%verbose, &
exitstat=stat(i))
+ endif
endif
else
write(stderr,*)'fpm::run<ERROR>',executables(i)%s,' not found'