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
17 REM build_windows_targets.bat 64
18 REM deletes build, creates build, runs CMake and compiles 64-bit Debug and Release.
23 if "%1"=="" goto no_args
28 echo.%%a | %WINDIR%\system32\find.exe /I "cmake">Nul && (set do_cmake=1)
29 echo.%%a | %WINDIR%\system32\find.exe "32">Nul && (set do_32=1)
30 echo.%%a | %WINDIR%\system32\find.exe "64">Nul && (set do_64=1)
36 echo No valid parameters specified.
42 REM Determine the appropriate CMake strings for the current version of Visual Studio
43 echo Determining VS version
44 python .\determine_vs_version.py > vsversion.tmp
45 set /p VS_VERSION=< vsversion.tmp
46 echo Detected Visual Studio Version as %VS_VERSION%
47 del /Q /F vsversion.tmp
54 echo Generating 64-bit CMake files for Visual Studio %VS_VERSION%
55 cmake -G "Visual Studio %VS_VERSION% Win64" ..
59 echo Generating 32-bit CMake files for Visual Studio %VS_VERSION%
60 cmake -G "Visual Studio %VS_VERSION%" ..
64 REM *******************************************
66 REM *******************************************
71 echo Generating 64-bit CMake files for Visual Studio %VS_VERSION%
72 cmake -G "Visual Studio %VS_VERSION% Win64" ..
73 echo Building 64-bit Debug
74 msbuild ALL_BUILD.vcxproj /p:Platform=x64 /p:Configuration=Debug /maxcpucount /verbosity:quiet
77 echo 64-bit Debug build failed!
82 echo Building 64-bit Release
83 msbuild ALL_BUILD.vcxproj /p:Platform=x64 /p:Configuration=Release /maxcpucount /verbosity:quiet
86 echo 64-bit Release build failed!
93 REM *******************************************
95 REM *******************************************
101 echo Generating 32-bit CMake files for Visual Studio %VS_VERSION%
102 cmake -G "Visual Studio %VS_VERSION%" ..
103 echo Building 32-bit Debug
104 msbuild ALL_BUILD.vcxproj /p:Platform=x86 /p:Configuration=Debug /maxcpucount /verbosity:quiet
107 echo 32-bit Debug build failed!
112 echo Building 32-bit Release
113 msbuild ALL_BUILD.vcxproj /p:Platform=x86 /p:Configuration=Release /maxcpucount /verbosity:quiet
116 echo 32-bit Release build failed!