Skip to content

Commit

Permalink
Build add-ons with jom to speed up the windows binary add-ons builds
Browse files Browse the repository at this point in the history
  • Loading branch information
AchimTuran authored and popcornmix committed Mar 15, 2017
1 parent 4ce8df8 commit cf2272f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
8 changes: 6 additions & 2 deletions tools/buildsteps/win32/bootstrap-addons.bat
Expand Up @@ -18,7 +18,10 @@ if "%1" == "clean" (
)

rem set Visual C++ build environment
call "%VS140COMNTOOLS%..\..\VC\bin\vcvars32.bat"
if not defined DevEnvDir (
:: without this if not defined the script can not be run several times in the same cmd.exe
call "%VS140COMNTOOLS%..\..\VC\bin\vcvars32.bat"
)

SET WORKDIR=%WORKSPACE%

Expand All @@ -32,6 +35,7 @@ IF "%WORKDIR%" == "" (
)

rem setup some paths that we need later
SET BUILD_ON_CORES=8
SET CUR_PATH=%CD%
SET BASE_PATH=%WORKDIR%\cmake
SET ADDONS_PATH=%BASE_PATH%\addons
Expand Down Expand Up @@ -81,7 +85,7 @@ IF ERRORLEVEL 1 (
)

rem execute nmake to prepare the buildsystem
nmake
"%WORKDIR%\tools\windows\buildtools\jom.exe" -j%BUILD_ON_CORES%
IF ERRORLEVEL 1 (
ECHO nmake failed with error level: %ERRORLEVEL%
)
Expand Down
10 changes: 7 additions & 3 deletions tools/buildsteps/win32/make-addons.bat
Expand Up @@ -24,7 +24,10 @@ FOR %%b IN (%*) DO (
SETLOCAL DisableDelayedExpansion

rem set Visual C++ build environment
call "%VS140COMNTOOLS%..\..\VC\bin\vcvars32.bat"
if not defined DevEnvDir (
:: without this if not defined the script can not be run several times in the same cmd.exe
call "%VS140COMNTOOLS%..\..\VC\bin\vcvars32.bat"
)

SET WORKDIR=%base_dir%

Expand All @@ -38,6 +41,7 @@ IF "%WORKDIR%" == "" (
)

rem setup some paths that we need later
SET BUILD_ON_CORES=8
SET CUR_PATH=%CD%
SET BASE_PATH=%WORKDIR%\cmake
SET SCRIPTS_PATH=%BASE_PATH%\scripts\windows
Expand Down Expand Up @@ -134,13 +138,13 @@ rem loop over all addons to build
FOR %%a IN (%ADDONS_TO_MAKE%) DO (
ECHO Building %%a...
rem execute nmake to build the addons
nmake %%a
"%WORKDIR%\tools\windows\buildtools\jom.exe" %%a -j%BUILD_ON_CORES%
IF ERRORLEVEL 1 (
ECHO nmake %%a error level: %ERRORLEVEL% > %ERRORFILE%
ECHO %%a >> %ADDONS_FAILURE_FILE%
) ELSE (
if %package% == true (
nmake package-%%a
"%WORKDIR%\tools\windows\buildtools\jom.exe" package-%%a -j%BUILD_ON_CORES%
IF ERRORLEVEL 1 (
ECHO nmake package-%%a error level: %ERRORLEVEL% > %ERRORFILE%
ECHO %%a >> %ADDONS_FAILURE_FILE%
Expand Down

0 comments on commit cf2272f

Please sign in to comment.