aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLKedward <laurence.kedward@bristol.ac.uk>2021-03-17 17:33:23 +0000
committerLKedward <laurence.kedward@bristol.ac.uk>2021-03-17 17:33:23 +0000
commit77c415417b72768e70abacf91a23a10ffe864c25 (patch)
tree6eb45d4bbdeba167cdb25f7fd3fd5dbbf32c5836
parent8841ab8b8cbd328f9c56a6f023a0ab02bfee5854 (diff)
downloadfpm-77c415417b72768e70abacf91a23a10ffe864c25.tar.gz
fpm-77c415417b72768e70abacf91a23a10ffe864c25.zip
Minor fix: for setting executable link libraries.
Executable link libraries were not working when auto discovery was on.
-rw-r--r--example_packages/link_executable/fpm.toml1
-rw-r--r--fpm/src/fpm_sources.f902
2 files changed, 1 insertions, 2 deletions
diff --git a/example_packages/link_executable/fpm.toml b/example_packages/link_executable/fpm.toml
index f3545ca..d9e94bb 100644
--- a/example_packages/link_executable/fpm.toml
+++ b/example_packages/link_executable/fpm.toml
@@ -1,5 +1,4 @@
name = "link_executable"
-build.auto-executables = false
[[executable]]
name = "gomp_test"
diff --git a/fpm/src/fpm_sources.f90 b/fpm/src/fpm_sources.f90
index 3fffa81..c781535 100644
--- a/fpm/src/fpm_sources.f90
+++ b/fpm/src/fpm_sources.f90
@@ -161,7 +161,7 @@ subroutine add_executable_sources(sources,executables,scope,auto_discover,error)
sources(j)%exe_name = executables(i)%name
if (allocated(executables(i)%link)) then
- exe_source%link_libraries = executables(i)%link
+ sources(j)%link_libraries = executables(i)%link
end if
cycle exe_loop