From 260f770171687a1e8694523f159bc4bbbf39bcf1 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Sat, 19 Oct 2013 22:03:13 +0000 Subject: [PATCH] add parameter for msbuild to use more cores --- mk/windoze/build-mg-2010.bat | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/mk/windoze/build-mg-2010.bat b/mk/windoze/build-mg-2010.bat index 0fe3c007..16d22503 100644 --- a/mk/windoze/build-mg-2010.bat +++ b/mk/windoze/build-mg-2010.bat @@ -95,17 +95,20 @@ if not "%SVNVERSION%" == "." echo #define SVNVERSION "%SVNVERSION%" > ..\..\sour set msBuildMaxCPU= SET BuildInParallel=false -if %NUMBER_OF_PROCESSORS% GTR 2 ( +SET BuildInParallelCount= +rem /m:%MultiprocMSBuildCount% +if %NUMBER_OF_PROCESSORS% GTR 1 ( SET NumberOfProcessesToUseForBuild=2 SET BuildInParallel=true + SET BuildInParallelCount=/m:2 SET msBuildMaxCPU=/maxcpucount) -ECHO Found CPU Count [%NUMBER_OF_PROCESSORS%] +ECHO Found CPU Count [%NUMBER_OF_PROCESSORS%] BuildInParallel = [%BuildInParallel%] if "%2" == "rebuild" echo Doing a FULL REBUILD... rem if "%2" == "rebuild" msbuild /detailedsummary %msBuildMaxCPU% /p:BuildInParallel=%BuildInParallel% /p:Configuration=Release /t:Rebuild Glest_vc2010.sln -if "%2" == "rebuild" msbuild %msBuildMaxCPU% /p:Configuration=Release /t:Rebuild Glest_vc2010.sln +if "%2" == "rebuild" msbuild %msBuildMaxCPU% %BuildInParallelCount% /p:Configuration=Release /t:Rebuild Glest_vc2010.sln rem if not "%2" == "rebuild" msbuild /detailedsummary %msBuildMaxCPU% /p:BuildInParallel=%BuildInParallel% /p:Configuration=Release Glest_vc2010.sln -if not "%2" == "rebuild" msbuild %msBuildMaxCPU% /p:Configuration=Release Glest_vc2010.sln +if not "%2" == "rebuild" msbuild %msBuildMaxCPU% %BuildInParallelCount% /p:Configuration=Release Glest_vc2010.sln rem pause execution so we can see the output before the batch file exits if not "%1" == "nopause" pause