aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorNicolas Schneider <nioncode+git@gmail.com>2019-01-01 13:05:26 +0100
committerJussi Pakkanen <jpakkane@gmail.com>2019-01-01 19:36:37 +0200
commit31e1a310309f6a3c46ff837414f70ee120397565 (patch)
treeef09bd4818db71a45e723d21dc62160bc35e279c /mesonbuild
parent8c9fcb1feac8ef7e4064ede9035f76ad53dc8e09 (diff)
downloadmeson-31e1a310309f6a3c46ff837414f70ee120397565.zip
meson-31e1a310309f6a3c46ff837414f70ee120397565.tar.gz
meson-31e1a310309f6a3c46ff837414f70ee120397565.tar.bz2
fail configuration if PCH files do not exist
Previously, the configuration worked fine, but the compiler raised an error. Now, we explicitly check for the existence of files and print a useful error message if they do not exist.
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/build.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py
index 1fcbc04..5d0fefa 100644
--- a/mesonbuild/build.py
+++ b/mesonbuild/build.py
@@ -1082,6 +1082,9 @@ You probably should put it in link_with instead.''')
raise InvalidArguments('PCH argument %s is of unknown type.' % pchlist[0])
elif len(pchlist) > 2:
raise InvalidArguments('PCH definition may have a maximum of 2 files.')
+ for f in pchlist:
+ if not os.path.isfile(os.path.join(self.environment.source_dir, self.subdir, f)):
+ raise MesonException('File %s does not exist.' % f)
self.pch[language] = pchlist
def add_include_dirs(self, args):