3 REM This Windows batch file builds this repository for the following targets:
4 REM 64/32-bit Release/Debug
5 REM It uses CMake to genererate the project files and then invokes msbuild
7 REM The update_external_sources.bat batch file must be executed before running
11 REM None: Runs CMake and builds all 4 combinations
12 REM Argument contains:
13 REM cmake (case insensitive): Deletes build and build32 and runs just CMake on both
14 REM 32: Deletes build32, runs CMake and builds 32-bit versions
15 REM 64: Deletes build, runs CMake and builds 64-bit versions
16 REM debug (case insensitive): Builds just the debug config of a 32 and/or 64-bit build
17 REM release (case insensitive): Builds just the release config of a 32 and/or 64-bit build
19 REM cmake: When specified, generate the CMake build files only - don't compile
20 REM 32/64: Specifying neither or both builds both
21 REM debug/release: Specifying neither or both builds both
23 REM build_windows_targets.bat 64
24 REM -- deletes build, creates build, runs CMake and compiles 64-bit Debug and Release.
25 REM build_windows_targets.bat 64 debug
26 REM -- deletes build, creates build, runs CMake and compiles 64-bit Debug.
41 echo.%%a | %WINDIR%\system32\find.exe /I "cmake">Nul && (set arg_cmake=1)
42 echo.%%a | %WINDIR%\system32\find.exe "32">Nul && (set arg_32=1)
43 echo.%%a | %WINDIR%\system32\find.exe "64">Nul && (set arg_64=1)
44 echo.%%a | %WINDIR%\system32\find.exe /I "debug">Nul && (set arg_debug=1)
45 echo.%%a | %WINDIR%\system32\find.exe /I "release">Nul && (set arg_release=1)
82 REM Determine the appropriate CMake strings for the current version of Visual Studio
83 echo Determining VS version
84 python .\scripts\determine_vs_version.py > vsversion.tmp
85 set /p VS_VERSION=< vsversion.tmp
86 echo Detected Visual Studio Version as %VS_VERSION%
87 del /Q /F vsversion.tmp
94 echo Generating 64-bit CMake files for Visual Studio %VS_VERSION%
95 cmake -G "Visual Studio %VS_VERSION% Win64" ..
99 echo Generating 32-bit CMake files for Visual Studio %VS_VERSION%
100 cmake -G "Visual Studio %VS_VERSION%" ..
104 REM *******************************************
106 REM *******************************************
111 echo Generating 64-bit CMake files for Visual Studio %VS_VERSION%
112 cmake -G "Visual Studio %VS_VERSION% Win64" ..
113 if %do_debug% equ 1 (
114 echo Building 64-bit Debug
115 msbuild ALL_BUILD.vcxproj /p:Platform=x64 /p:Configuration=Debug /maxcpucount /verbosity:quiet
118 echo 64-bit Debug build failed!
125 echo Building 64-bit Release
126 msbuild ALL_BUILD.vcxproj /p:Platform=x64 /p:Configuration=Release /maxcpucount /verbosity:quiet
129 echo 64-bit Release build failed!
137 REM *******************************************
139 REM *******************************************
145 echo Generating 32-bit CMake files for Visual Studio %VS_VERSION%
146 cmake -G "Visual Studio %VS_VERSION%" ..
148 echo Building 32-bit Debug
149 msbuild ALL_BUILD.vcxproj /p:Platform=x86 /p:Configuration=Debug /maxcpucount /verbosity:quiet
152 echo 32-bit Debug build failed!
159 echo Building 32-bit Release
160 msbuild ALL_BUILD.vcxproj /p:Platform=x86 /p:Configuration=Release /maxcpucount /verbosity:quiet
163 echo 32-bit Release build failed!