mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-07 20:02:05 +00:00
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
88d4c15c87
commit
3fd592c2e2
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…
x
Reference in New Issue
Block a user