scons: add HOST option, which if set will skip configure checks - in the future it might do more
This commit is contained in:
parent
f6870a6b70
commit
5af0e95c94
1 changed files with 38 additions and 32 deletions
|
@ -274,6 +274,7 @@ opts.AddVariables(
|
|||
('WARNING_CXXFLAGS', 'Compiler flags you can set to reduce warning levels which are placed after -Wall.', ''),
|
||||
|
||||
# SCons build behavior options
|
||||
('HOST', 'Set the target host for cross compiling"', ''),
|
||||
('CONFIG', "The path to the python file in which to save user configuration options. Currently : '%s'" % SCONS_LOCAL_CONFIG,SCONS_LOCAL_CONFIG),
|
||||
BoolVariable('USE_CONFIG', "Use SCons user '%s' file (will also write variables after successful configuration)", 'True'),
|
||||
# http://www.scons.org/wiki/GoFastButton
|
||||
|
@ -1187,6 +1188,7 @@ if not preconfigured:
|
|||
if env['PRIORITIZE_LINKING']:
|
||||
conf.prioritize_paths(silent=False)
|
||||
|
||||
if not env['HOST']:
|
||||
for libname, headers, required, lang in LIBSHEADERS:
|
||||
if not conf.CheckLibWithHeader(libname, headers, lang):
|
||||
if required:
|
||||
|
@ -1196,6 +1198,7 @@ if not preconfigured:
|
|||
color_print(4, 'Could not find optional header or shared library for %s' % libname)
|
||||
env['SKIPPED_DEPS'].append(libname)
|
||||
|
||||
if not env['HOST']:
|
||||
if env['ICU_LIB_NAME'] not in env['MISSING_DEPS']:
|
||||
if not conf.icu_at_least_four_two():
|
||||
# expression_string.cpp and map.cpp use fromUTF* function only available in >= ICU 4.2
|
||||
|
@ -1234,6 +1237,7 @@ if not preconfigured:
|
|||
if env['PRIORITIZE_LINKING']:
|
||||
conf.prioritize_paths()
|
||||
|
||||
if not env['HOST']:
|
||||
# if the user is not setting custom boost configuration
|
||||
# enforce boost version greater than or equal to BOOST_MIN_VERSION
|
||||
if not conf.CheckBoost(BOOST_MIN_VERSION):
|
||||
|
@ -1244,6 +1248,7 @@ if not preconfigured:
|
|||
else:
|
||||
color_print(4,'Found boost lib version... %s' % env.get('BOOST_LIB_VERSION_FROM_HEADER') )
|
||||
|
||||
if not env['HOST']:
|
||||
for count, libinfo in enumerate(BOOST_LIBSHEADERS):
|
||||
if not conf.CheckLibWithHeader('boost_%s%s' % (libinfo[0],env['BOOST_APPEND']), libinfo[1], 'C++'):
|
||||
if libinfo[2]:
|
||||
|
@ -1479,6 +1484,7 @@ if not preconfigured:
|
|||
env['BOOST_PYTHON_LIB'] = 'boost_python3%s' % env['BOOST_APPEND']
|
||||
elif env['BOOST_PYTHON_LIB'] == 'boost_python':
|
||||
env['BOOST_PYTHON_LIB'] = 'boost_python%s' % env['BOOST_APPEND']
|
||||
if not env['HOST']:
|
||||
if not conf.CheckHeader(header='boost/python/detail/config.hpp',language='C++'):
|
||||
color_print(1,'Could not find required header files for boost python')
|
||||
env['MISSING_DEPS'].append('boost python')
|
||||
|
|
Loading…
Reference in a new issue