Better error message when PCH argument is not a string.

pull/4924/head
Jussi Pakkanen 6 years ago
parent 8361da5c52
commit 40b5abd668
  1. 2
      mesonbuild/build.py

@ -1102,6 +1102,8 @@ You probably should put it in link_with instead.''')
elif len(pchlist) > 2:
raise InvalidArguments('PCH definition may have a maximum of 2 files.')
for f in pchlist:
if not isinstance(f, str):
raise MesonException('PCH arguments must be strings.')
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

Loading…
Cancel
Save