aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2021-03-05 17:41:15 +0200
committerNirbheek Chauhan <nirbheek@centricular.com>2021-04-04 00:03:09 +0530
commit903136c787e1dd328effd06d21c55118d1df7b7a (patch)
treec63790b5e194b4bbf22323e91806d8d232fc75a1
parentb2b48a924084106e0c1c784be30cc4dfa4c40512 (diff)
downloadmeson-903136c787e1dd328effd06d21c55118d1df7b7a.zip
meson-903136c787e1dd328effd06d21c55118d1df7b7a.tar.gz
meson-903136c787e1dd328effd06d21c55118d1df7b7a.tar.bz2
Fix Fortran dep scanner for upper case file extensions. Closes #8395.
-rw-r--r--mesonbuild/backend/ninjabackend.py2
-rw-r--r--test cases/fortran/2 modules/meson.build3
-rw-r--r--test cases/fortran/2 modules/mymod.F90 (renamed from test cases/fortran/2 modules/mymod.f90)0
3 files changed, 3 insertions, 2 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index 58fd5c6..6841960 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -2523,7 +2523,7 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47485'''))
if not self.should_use_dyndeps_for_target(target):
return
extension = os.path.splitext(src.fname)[1][1:]
- if not (extension in compilers.lang_suffixes['fortran'] or extension in compilers.lang_suffixes['cpp']):
+ if not (extension.lower() in compilers.lang_suffixes['fortran'] or extension in compilers.lang_suffixes['cpp']):
return
dep_scan_file = self.get_dep_scan_file_for(target)
element.add_item('dyndep', dep_scan_file)
diff --git a/test cases/fortran/2 modules/meson.build b/test cases/fortran/2 modules/meson.build
index 791ae63..c9bfd8d 100644
--- a/test cases/fortran/2 modules/meson.build
+++ b/test cases/fortran/2 modules/meson.build
@@ -3,6 +3,7 @@ project('modules', 'fortran',
commented = library('commented', 'comment_mod.f90')
-e = executable('modprog', 'mymod.f90', 'prog.f90',
+# Have one file with an upper case file extension.
+e = executable('modprog', 'mymod.F90', 'prog.f90',
link_with: commented)
test('moduletest', e)
diff --git a/test cases/fortran/2 modules/mymod.f90 b/test cases/fortran/2 modules/mymod.F90
index a45f5c9..a45f5c9 100644
--- a/test cases/fortran/2 modules/mymod.f90
+++ b/test cases/fortran/2 modules/mymod.F90