aboutsummaryrefslogtreecommitdiff
path: root/src/fpm.f90
diff options
context:
space:
mode:
authorLaurence Kedward <laurence.kedward@bristol.ac.uk>2021-04-16 16:07:55 +0100
committerGitHub <noreply@github.com>2021-04-16 16:07:55 +0100
commit4cbf9194e47991a208cd61b1f3a0a55f0ae16573 (patch)
treecbb083bd19a22a1236c31de991409ce06b595748 /src/fpm.f90
parenta540c83d9e303acd6fece95927c49fa8d2565366 (diff)
parentc80169d9ad9e619e9c022eedb2313e62ca4ef0a9 (diff)
downloadfpm-4cbf9194e47991a208cd61b1f3a0a55f0ae16573.tar.gz
fpm-4cbf9194e47991a208cd61b1f3a0a55f0ae16573.zip
Merge pull request #438 from LKedward/external-mods
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