aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2017-08-15 12:23:09 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2017-08-17 00:20:34 +0300
commitaa49c3cebd1ba8f6f78b977e6a331a0ec5b181f5 (patch)
tree84dde633d9462e463df4576f9980ad5dc80bb505
parent6bf65d876331a273a5393281de87747235420345 (diff)
downloadmeson-aa49c3cebd1ba8f6f78b977e6a331a0ec5b181f5.zip
meson-aa49c3cebd1ba8f6f78b977e6a331a0ec5b181f5.tar.gz
meson-aa49c3cebd1ba8f6f78b977e6a331a0ec5b181f5.tar.bz2
Ignore encoding when scanning Fortran sources.
-rw-r--r--mesonbuild/backend/ninjabackend.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index 0587cff..2d2c034 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -1833,7 +1833,9 @@ rule FORTRAN_DEP_HACK
continue
filename = s.absolute_path(self.environment.get_source_dir(),
self.environment.get_build_dir())
- with open(filename) as f:
+ # Some Fortran editors save in weird encodings,
+ # but all the parts we care about are in ASCII.
+ with open(filename, errors='ignore') as f:
for line in f:
modmatch = modre.match(line)
if modmatch is not None: