From e0d336ce1aea71693c467367e19bf102f662ec43 Mon Sep 17 00:00:00 2001 From: kubajj Date: Wed, 31 Mar 2021 10:54:32 +0200 Subject: Print filename when duplicate found and remove duplicate test call --- fpm/src/fpm.f90 | 3 ++- fpm/test/fpm_test/test_module_dependencies.f90 | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/fpm/src/fpm.f90 b/fpm/src/fpm.f90 index 1d2b0ae..31b68ff 100644 --- a/fpm/src/fpm.f90 +++ b/fpm/src/fpm.f90 @@ -220,7 +220,8 @@ subroutine check_modules_for_duplicates(model, duplicates_found) if (allocated(model%packages(k)%sources(l)%modules_provided)) then do m=1,size(model%packages(k)%sources(l)%modules_provided) if (model%packages(k)%sources(l)%modules_provided(m)%s.in.modules(:modi-1)) then - write(error_unit, *) "Warning: Module ",model%packages(k)%sources(l)%modules_provided(m)%s," is a duplicate" + write(error_unit, *) "Warning: Module ",model%packages(k)%sources(l)%modules_provided(m)%s, & + " in ",model%packages(k)%sources(l)%file_name," is a duplicate" duplicates_found = .true. else modules(modi) = model%packages(k)%sources(l)%modules_provided(m) diff --git a/fpm/test/fpm_test/test_module_dependencies.f90 b/fpm/test/fpm_test/test_module_dependencies.f90 index 021375b..f193646 100644 --- a/fpm/test/fpm_test/test_module_dependencies.f90 +++ b/fpm/test/fpm_test/test_module_dependencies.f90 @@ -44,8 +44,6 @@ contains test_package_with_no_module_duplicates), & & new_unittest("package-with-duplicates-in-same-source", & test_package_module_duplicates_same_source, should_fail=.true.), & - & new_unittest("package-with-duplicates-in-same-source", & - test_package_module_duplicates_same_source, should_fail=.true.), & & new_unittest("package-with-duplicates-in-one-package", & test_package_module_duplicates_one_package, should_fail=.true.), & & new_unittest("package-with-duplicates-in-two-packages", & -- cgit v1.2.3