From 77c415417b72768e70abacf91a23a10ffe864c25 Mon Sep 17 00:00:00 2001 From: LKedward Date: Wed, 17 Mar 2021 17:33:23 +0000 Subject: Minor fix: for setting executable link libraries. Executable link libraries were not working when auto discovery was on. --- example_packages/link_executable/fpm.toml | 1 - fpm/src/fpm_sources.f90 | 2 +- 2 files changed, 1 insertion(+), 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 -- cgit v1.2.3