parallel builds
parent
a9dd8971b0
commit
e2f25f98d1
|
@ -1,3 +1,5 @@
|
|||
import multiprocessing
|
||||
|
||||
Import('sys', 'os', 'SCons')
|
||||
|
||||
AddOption("--cfg", dest="cfg", type="string", nargs=1, action='store', help='Manually specify a configuration file')
|
||||
|
@ -7,6 +9,12 @@ if configFile == None:
|
|||
|
||||
configFile = os.path.normpath(os.path.join(os.path.dirname(os.getcwd()), configFile))
|
||||
|
||||
AddOption("--parallelize", dest="parallelize", action='store_true', help='Parallelize to the available number of cores?')
|
||||
parallelize = GetOption('parallelize')
|
||||
|
||||
if parallelize == True:
|
||||
SetOption('num_jobs', multiprocessing.cpu_count())
|
||||
|
||||
if not os.path.exists(configFile):
|
||||
print 'A configuration file must be selected! Have a look at \"README\"'
|
||||
Exit(1)
|
||||
|
@ -84,7 +92,7 @@ if env.has_key('BASELIBDIR'):
|
|||
env.Decider('MD5-timestamp')
|
||||
#env.SetOption('num_jobs', multiprocessing.cpu_count())
|
||||
|
||||
AddOption("--dist", dest="dist", type="string", nargs=0, action='store', help='Make an official release')
|
||||
AddOption("--dist", dest="dist", action="store_true", help='Make an official release')
|
||||
|
||||
# Check whether everything important is available
|
||||
def CheckCXX(context):
|
||||
|
|
|
@ -27,9 +27,9 @@
|
|||
>
|
||||
<Tool
|
||||
Name="VCNMakeTool"
|
||||
BuildCommandLine="scons --cfg=config/config-msvc2008-win32-debug.py"
|
||||
ReBuildCommandLine="scons --cfg=config/config-msvc2008-win32-debug.py -c && scons --cfg=config/config-msvc2008-win32-debug.py"
|
||||
CleanCommandLine="scons --cfg=config/config-msvc2008-win32-debug.py -c"
|
||||
BuildCommandLine="scons --parallelize --cfg=config/config-msvc2008-win32-debug.py"
|
||||
ReBuildCommandLine="scons --parallelize --cfg=config/config-msvc2008-win32-debug.py -c && scons --parallelize --cfg=config/config-msvc2008-win32-debug.py"
|
||||
CleanCommandLine="scons --parallelize --cfg=config/config-msvc2008-win32-debug.py -c"
|
||||
Output="dist\mtsgui.exe"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;"
|
||||
IncludeSearchPath=""
|
||||
|
@ -47,9 +47,9 @@
|
|||
>
|
||||
<Tool
|
||||
Name="VCNMakeTool"
|
||||
BuildCommandLine="scons --cfg=config/config-msvc2008-win32.py"
|
||||
ReBuildCommandLine="scons --cfg=config/config-msvc2008-win32.py -c && scons --cfg=config/config-msvc2008-win32.py"
|
||||
CleanCommandLine="scons --cfg=config/config-msvc2008-win32.py -c"
|
||||
BuildCommandLine="scons --parallelize --cfg=config/config-msvc2008-win32.py"
|
||||
ReBuildCommandLine="scons --parallelize --cfg=config/config-msvc2008-win32.py -c && scons --parallelize --cfg=config/config-msvc2008-win32.py"
|
||||
CleanCommandLine="scons --parallelize --cfg=config/config-msvc2008-win32.py -c"
|
||||
Output="dist\mtsgui.exe"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;"
|
||||
IncludeSearchPath=""
|
||||
|
@ -67,9 +67,9 @@
|
|||
>
|
||||
<Tool
|
||||
Name="VCNMakeTool"
|
||||
BuildCommandLine="scons --cfg=config/config-msvc2008-win64-debug.py"
|
||||
ReBuildCommandLine="scons --cfg=config/config-msvc2008-win64-debug.py -c && scons --cfg=config/config-msvc2008-win64-debug.py"
|
||||
CleanCommandLine="scons --cfg=config/config-msvc2008-win64-debug.py -c"
|
||||
BuildCommandLine="scons --parallelize --cfg=config/config-msvc2008-win64-debug.py"
|
||||
ReBuildCommandLine="scons --parallelize --cfg=config/config-msvc2008-win64-debug.py -c && scons --parallelize --cfg=config/config-msvc2008-win64-debug.py"
|
||||
CleanCommandLine="scons --parallelize --cfg=config/config-msvc2008-win64-debug.py -c"
|
||||
Output="dist\mtsgui.exe"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;"
|
||||
IncludeSearchPath=""
|
||||
|
@ -87,9 +87,9 @@
|
|||
>
|
||||
<Tool
|
||||
Name="VCNMakeTool"
|
||||
BuildCommandLine="scons --cfg=config/config-msvc2008-win64.py"
|
||||
ReBuildCommandLine="scons --cfg=config/config-msvc2008-win64.py -c && scons --cfg=config/config-msvc2008-win64.py"
|
||||
CleanCommandLine="scons --cfg=config/config-msvc2008-win64.py -c"
|
||||
BuildCommandLine="scons --parallelize --cfg=config/config-msvc2008-win64.py"
|
||||
ReBuildCommandLine="scons --parallelize --cfg=config/config-msvc2008-win64.py -c && scons --parallelize --cfg=config/config-msvc2008-win64.py"
|
||||
CleanCommandLine="scons --parallelize --cfg=config/config-msvc2008-win64.py -c"
|
||||
Output="dist\mtsgui.exe"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;"
|
||||
IncludeSearchPath=""
|
||||
|
|
Loading…
Reference in New Issue