Fix run_command() with command on a different drive

On Windows, program on a different drive than srcdir won't have
an expressible relative path; cmd_path will be absolute instead and
shouldn't get added into build_def_files.
pull/5172/head
Jakub Adam 6 years ago committed by Jussi Pakkanen
parent 68567482f5
commit 0ad5670895
  1. 6
      mesonbuild/interpreter.py

@ -2335,7 +2335,11 @@ external dependencies (including libraries) must go to "dependencies".''')
'or not executable'.format(cmd))
cmd = prog
cmd_path = mesonlib.relpath(cmd.get_path(), start=srcdir)
if not cmd_path.startswith('..') and cmd_path not in self.build_def_files:
if not cmd_path.startswith('..'):
# On Windows, program on a different drive than srcdir won't have
# an expressible relative path; cmd_path will be absolute instead.
if not os.path.isabs(cmd_path):
if cmd_path not in self.build_def_files:
self.build_def_files.append(cmd_path)
expanded_args = []
for a in listify(cargs):

Loading…
Cancel
Save