aboutsummaryrefslogtreecommitdiff
path: root/src/fpm.f90
diff options
context:
space:
mode:
authorLKedward <laurence.kedward@bristol.ac.uk>2021-04-12 16:39:29 +0100
committerLKedward <laurence.kedward@bristol.ac.uk>2021-04-12 16:44:37 +0100
commita49b0177f8d7ca74b3bfaa325fd37ee614975367 (patch)
treed0455e6d9ebc1514a658d0d3142911dfe9b5d968 /src/fpm.f90
parent0d3611a5f3e7a2d7cb88ec8637a9d898b2ce4cfb (diff)
downloadfpm-a49b0177f8d7ca74b3bfaa325fd37ee614975367.tar.gz
fpm-a49b0177f8d7ca74b3bfaa325fd37ee614975367.zip
Add: external-modules key to build table for non-fpm modules
Diffstat (limited to 'src/fpm.f90')
-rw-r--r--src/fpm.f905
1 files changed, 5 insertions, 0 deletions
diff --git a/src/fpm.f90 b/src/fpm.f90
index 31b68ff..a62ffe0 100644
--- a/src/fpm.f90
+++ b/src/fpm.f90
@@ -51,6 +51,7 @@ subroutine build_model(model, settings, package, error)
allocate(model%include_dirs(0))
allocate(model%link_libraries(0))
+ allocate(model%external_modules(0))
call new_dependency_tree(model%deps, cache=join_path("build", "cache.toml"))
call model%deps%add(package, error)
@@ -171,6 +172,10 @@ subroutine build_model(model, settings, package, error)
if (allocated(dependency%build%link)) then
model%link_libraries = [model%link_libraries, dependency%build%link]
end if
+
+ if (allocated(dependency%build%external_modules)) then
+ model%external_modules = [model%external_modules, dependency%build%external_modules]
+ end if
end associate
end do
if (allocated(error)) return