scons: added ctool option to specify c compiler command
if cxxtool option is unspecified it will be derived from ctool
This commit is contained in:
parent
3a5b122325
commit
4456dcbfaf
1 changed files with 8 additions and 2 deletions
10
SConstruct
10
SConstruct
|
@ -100,6 +100,7 @@ opts.AddVariables(
|
|||
('jobs', 'Set the number of parallel compilations', "1", lambda key, value, env: int(value), int),
|
||||
BoolVariable('distcc', 'Use distcc', False),
|
||||
BoolVariable('ccache', "Use ccache", False),
|
||||
('ctool', 'Set c compiler command if not using standard compiler.'),
|
||||
('cxxtool', 'Set c++ compiler command if not using standard compiler.'),
|
||||
BoolVariable('cxx0x', 'Use C++0x features.', False),
|
||||
BoolVariable('openmp', 'Enable openmp use.', False),
|
||||
|
@ -157,10 +158,15 @@ else:
|
|||
from cross_compile import *
|
||||
setup_cross_compile(env)
|
||||
|
||||
if 'HOME' in os.environ:
|
||||
env['ENV']['HOME'] = os.environ['HOME']
|
||||
|
||||
if env.get('ctool',""):
|
||||
env['CC'] = env['ctool']
|
||||
env['CXX'] = env['ctool'].rstrip("cc") + "++"
|
||||
|
||||
if env.get('cxxtool',""):
|
||||
env['CXX'] = env['cxxtool']
|
||||
if 'HOME' in os.environ:
|
||||
env['ENV']['HOME'] = os.environ['HOME']
|
||||
|
||||
if env['jobs'] > 1:
|
||||
SetOption("num_jobs", env['jobs'])
|
||||
|
|
Loading…
Add table
Reference in a new issue