scons: add a parameter to configure SCons' build cache
This commit is contained in:
parent
b4b6a2338a
commit
5fcf442f4f
1 changed files with 7 additions and 0 deletions
|
@ -312,6 +312,7 @@ global_sticky_vars.AddVariables(
|
||||||
('CXX', 'C++ compiler', environ.get('CXX', main['CXX'])),
|
('CXX', 'C++ compiler', environ.get('CXX', main['CXX'])),
|
||||||
('BATCH', 'Use batch pool for build and tests', False),
|
('BATCH', 'Use batch pool for build and tests', False),
|
||||||
('BATCH_CMD', 'Batch pool submission command name', 'qdo'),
|
('BATCH_CMD', 'Batch pool submission command name', 'qdo'),
|
||||||
|
('M5_BUILD_CACHE', 'Cache built objects in this directory', False),
|
||||||
('EXTRAS', 'Add Extra directories to the compilation', '',
|
('EXTRAS', 'Add Extra directories to the compilation', '',
|
||||||
PathListAllExist, PathListMakeAbsolute),
|
PathListAllExist, PathListMakeAbsolute),
|
||||||
)
|
)
|
||||||
|
@ -549,6 +550,12 @@ py_libs.append(py_version)
|
||||||
main.Append(CPPPATH=py_includes)
|
main.Append(CPPPATH=py_includes)
|
||||||
main.Append(LIBPATH=py_lib_path)
|
main.Append(LIBPATH=py_lib_path)
|
||||||
|
|
||||||
|
# Cache build files in the supplied directory.
|
||||||
|
if main['M5_BUILD_CACHE']:
|
||||||
|
print 'Using build cache located at', main['M5_BUILD_CACHE']
|
||||||
|
CacheDir(main['M5_BUILD_CACHE'])
|
||||||
|
|
||||||
|
|
||||||
# verify that this stuff works
|
# verify that this stuff works
|
||||||
if not conf.CheckHeader('Python.h', '<>'):
|
if not conf.CheckHeader('Python.h', '<>'):
|
||||||
print "Error: can't find Python.h header in", py_includes
|
print "Error: can't find Python.h header in", py_includes
|
||||||
|
|
Loading…
Reference in a new issue