Check that requested executables are available. Closes #1591.

This commit is contained in:
Jussi Pakkanen 2017-04-09 22:25:08 +03:00
parent 0b772f37c0
commit 4c6f99a31a
1 changed files with 10 additions and 0 deletions

View File

@ -21,6 +21,7 @@ import subprocess, sys, os, argparse
import pickle
from mesonbuild import build
from mesonbuild import environment
from mesonbuild.dependencies import ExternalProgram
import time, datetime, multiprocessing, json
import concurrent.futures as conc
@ -574,12 +575,21 @@ def run(args):
print('Can not be both quiet and verbose at the same time.')
return 1
check_bin = None
if options.gdb:
options.verbose = True
if options.wrapper:
print('Must not specify both a wrapper and gdb at the same time.')
return 1
check_bin = 'gdb'
if options.wrapper:
check_bin = options.wrapper[0]
if check_bin is not None:
exe = ExternalProgram(check_bin, silent=True)
if not exe.found():
sys.exit("Could not find requested program: %s" % check_bin)
options.wd = os.path.abspath(options.wd)
if not options.no_rebuild: