parallel builds

metadata
Wenzel Jakob 2011-03-01 15:03:37 +01:00
parent a9dd8971b0
commit e2f25f98d1
2 changed files with 21 additions and 13 deletions

View File

@ -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):

View File

@ -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 &amp;&amp; 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 &amp;&amp; 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 &amp;&amp; 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 &amp;&amp; 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 &amp;&amp; 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 &amp;&amp; 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 &amp;&amp; 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 &amp;&amp; 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=""