raise exception when a non-required module not found and subsequently used

pull/5942/head
Michael Hirsch, Ph.D 5 years ago
parent 765a5e9835
commit 4857940e89
No known key found for this signature in database
GPG Key ID: 6D23CDADAB0294F9
  1. 2
      mesonbuild/interpreter.py

@ -2388,6 +2388,8 @@ external dependencies (including libraries) must go to "dependencies".''')
msg = 'Program {!r} was overridden with the compiled executable {!r}'\
' and therefore cannot be used during configuration'
raise InterpreterException(msg.format(progname, cmd.description()))
if not cmd.found():
raise InterpreterException('command {!r} not found or not executable'.format(cmd))
elif isinstance(cmd, CompilerHolder):
cmd = cmd.compiler.get_exelist()[0]
prog = ExternalProgram(cmd, silent=True)

Loading…
Cancel
Save