From d314aed051dbc83f1a5ce8dce39b3b70f552509d Mon Sep 17 00:00:00 2001 From: Carlos Une Date: Sat, 16 Oct 2021 12:54:19 -0300 Subject: Change link command on Windows with `ifort` or `ifx` (#590) * Check whether compiler is `ifort` or `ifx` on Windows * Linker command with ifort/ifx on Windows * Enumerate libraries, based on compiler and platform --- src/fpm_targets.f90 | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/fpm_targets.f90') diff --git a/src/fpm_targets.f90 b/src/fpm_targets.f90 index 87809e6..e8fcf9c 100644 --- a/src/fpm_targets.f90 +++ b/src/fpm_targets.f90 @@ -466,7 +466,7 @@ subroutine resolve_target_linking(targets, model) global_link_flags = "" if (allocated(model%link_libraries)) then if (size(model%link_libraries) > 0) then - global_link_flags = global_link_flags // " -l" // string_cat(model%link_libraries," -l") + global_link_flags = model%compiler%enumerate_libraries(global_link_flags, model%link_libraries) end if end if @@ -518,10 +518,8 @@ subroutine resolve_target_linking(targets, model) if (allocated(target%link_libraries)) then if (size(target%link_libraries) > 0) then - target%link_flags = target%link_flags & - & // " -l" // string_cat(target%link_libraries," -l") - local_link_flags = local_link_flags & - & // " -l" // string_cat(target%link_libraries," -l") + target%link_flags = model%compiler%enumerate_libraries(target%link_flags, target%link_libraries) + local_link_flags = model%compiler%enumerate_libraries(local_link_flags, target%link_libraries) end if end if -- cgit v1.2.3