diff options
author | Jonas Lundholm Bertelsen <drixi.b@gmail.com> | 2021-01-20 18:11:02 +0100 |
---|---|---|
committer | Jonas Lundholm Bertelsen <drixi.b@gmail.com> | 2021-01-20 18:11:02 +0100 |
commit | bd2394e8724a7a95f8beeb3839707e495be41fc0 (patch) | |
tree | 6c457304c5f778edd2da0af675fc87e02de4a1da /mesonbuild/scripts | |
parent | 8133a7b9a4b8f0686fbc479aa2d64e41c85a979b (diff) | |
download | meson-bd2394e8724a7a95f8beeb3839707e495be41fc0.zip meson-bd2394e8724a7a95f8beeb3839707e495be41fc0.tar.gz meson-bd2394e8724a7a95f8beeb3839707e495be41fc0.tar.bz2 |
Use case-insensitive suffix check for fortran
In Fortran it is common to use capital F in the suffix (eg. '.F90') if
the source file makes use of preprocessor statements. Such files should
probably be treated like all other fortran files by meson.
Case insensitivity for suffixes was already implemented several places
in meson before this. So most likely, the few places changed here were
oversights anyway.
Diffstat (limited to 'mesonbuild/scripts')
-rw-r--r-- | mesonbuild/scripts/depscan.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/scripts/depscan.py b/mesonbuild/scripts/depscan.py index df7df48..c85f8e7 100644 --- a/mesonbuild/scripts/depscan.py +++ b/mesonbuild/scripts/depscan.py @@ -46,7 +46,7 @@ class DependencyScanner: self.sources_with_exports = [] # type: T.List[str] def scan_file(self, fname: str) -> None: - suffix = os.path.splitext(fname)[1][1:] + suffix = os.path.splitext(fname)[1][1:].lower() if suffix in lang_suffixes['fortran']: self.scan_fortran_file(fname) elif suffix in lang_suffixes['cpp']: @@ -131,7 +131,7 @@ class DependencyScanner: return objname def module_name_for(self, src: str) -> str: - suffix= os.path.splitext(src)[1][1:] + suffix = os.path.splitext(src)[1][1:].lower() if suffix in lang_suffixes['fortran']: exported = self.exports[src] # Module foo:bar goes to a file name foo@bar.smod |