Merge pull request #16 from Nava2/frespect-cxx

Change bootstrap.py to respect `CXX` variable
This commit is contained in:
The Phantom Derpstorm 2016-02-24 11:21:02 -05:00
commit e046435b49

View File

@ -32,10 +32,13 @@ def replace_extension(f, e):
# Default install dir # Default install dir
install_dir = os.path.join('/usr', 'include') if 'linux' in sys.platform else 'include' install_dir = os.path.join('/usr', 'include') if 'linux' in sys.platform else 'include'
# Compiler: Read from environment
cxx = os.environ['CXX']
# command line stuff # command line stuff
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument('--debug', action='store_true', help='compile with debug flags') parser.add_argument('--debug', action='store_true', help='compile with debug flags')
parser.add_argument('--cxx', metavar='<compiler>', help='compiler name to use (default: g++)', default='g++') parser.add_argument('--cxx', metavar='<compiler>', help='compiler name to use (default: env.CXX=%s)' % cxx, default=cxx)
parser.add_argument('--ci', action='store_true', help=argparse.SUPPRESS) parser.add_argument('--ci', action='store_true', help=argparse.SUPPRESS)
parser.add_argument('--testing', action='store_true', help=argparse.SUPPRESS) parser.add_argument('--testing', action='store_true', help=argparse.SUPPRESS)
parser.add_argument('--lua-dir', metavar='<dir>', help='directory lua is in with include and lib subdirectories') parser.add_argument('--lua-dir', metavar='<dir>', help='directory lua is in with include and lib subdirectories')