aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLKedward <laurence.kedward@bristol.ac.uk>2020-09-26 11:26:37 +0100
committerLKedward <laurence.kedward@bristol.ac.uk>2020-09-26 11:26:37 +0100
commit8c558743ecad4f21f9695f81826326c5a14ee93f (patch)
treeee27efa6e215a47caa1cfe16902bdc7d2ec5bf2a
parent04fd3870fb8cbb6014a197b26b71f6e3021ccba1 (diff)
downloadfpm-8c558743ecad4f21f9695f81826326c5a14ee93f.tar.gz
fpm-8c558743ecad4f21f9695f81826326c5a14ee93f.zip
Fix: allow app modules to use modules in same folder
-rw-r--r--fpm/src/fpm_sources.f903
1 files changed, 2 insertions, 1 deletions
diff --git a/fpm/src/fpm_sources.f90 b/fpm/src/fpm_sources.f90
index 72fcf5b..448174e 100644
--- a/fpm/src/fpm_sources.f90
+++ b/fpm/src/fpm_sources.f90
@@ -572,7 +572,8 @@ subroutine resolve_module_dependencies(sources)
cycle
end if
- if (sources(i)%unit_type == FPM_UNIT_PROGRAM) then
+ if (sources(i)%unit_scope == FPM_SCOPE_APP .OR. &
+ sources(i)%unit_scope == FPM_SCOPE_TEST ) then
dep%ptr => &
find_module_dependency(sources,sources(i)%modules_used(j)%s, &
include_dir = dirname(sources(i)%file_name))