From bd2394e8724a7a95f8beeb3839707e495be41fc0 Mon Sep 17 00:00:00 2001 From: Jonas Lundholm Bertelsen Date: Wed, 20 Jan 2021 18:11:02 +0100 Subject: 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. --- mesonbuild/backend/ninjabackend.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mesonbuild/backend') diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index d66708c..a008795 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -637,7 +637,7 @@ int dummy; if self.environment.is_llvm_ir(source) or \ self.environment.is_assembly(source): return False - suffix = os.path.splitext(source)[1][1:] + suffix = os.path.splitext(source)[1][1:].lower() for lang in self.langs_cant_unity: if lang not in target.compilers: continue @@ -925,7 +925,7 @@ int dummy; all_suffixes = set(compilers.lang_suffixes['cpp']) | set(compilers.lang_suffixes['fortran']) selected_sources = [] for source in compiled_sources: - ext = os.path.splitext(source)[1][1:] + ext = os.path.splitext(source)[1][1:].lower() if ext in all_suffixes: selected_sources.append(source) return selected_sources -- cgit v1.1