blob: ee29882cdb55834335fe652d3be19d570bcc2866 [file] [log] [blame]
Cody Northropa8ac1352015-05-12 16:23:59 -06001@echo off
Cody Northrope13dd832015-12-30 11:53:18 -07002REM Update source for glslang, LunarGLASS, spirv-tools
Cody Northropa8ac1352015-05-12 16:23:59 -06003
4setlocal EnableDelayedExpansion
5set errorCode=0
6set BUILD_DIR=%~dp0
7set BASE_DIR=%BUILD_DIR%..
8set GLSLANG_DIR=%BASE_DIR%\glslang
9set LUNARGLASS_DIR=%BASE_DIR%\LunarGLASS
Cody Northrope13dd832015-12-30 11:53:18 -070010set SPIRV_TOOLS_DIR=%BASE_DIR%\spirv-tools
Cody Northropa8ac1352015-05-12 16:23:59 -060011
12REM // ======== Parameter parsing ======== //
13
14 if "%1" == "" (
15 echo usage: update_external_sources.bat [options]
16 echo.
17 echo Available options:
18 echo --sync-glslang just pull glslang_revision
19 echo --sync-LunarGLASS just pull LunarGLASS_revision
Cody Northrope13dd832015-12-30 11:53:18 -070020 echo --sync-spirv-tools just pull spirv-tools_revision
Cody Northropa8ac1352015-05-12 16:23:59 -060021 echo --build-glslang pulls glslang_revision, configures CMake, builds Release and Debug
22 echo --build-LunarGLASS pulls LunarGLASS_revision, configures CMake, builds Release and Debug
Cody Northrope13dd832015-12-30 11:53:18 -070023 echo --build-spirv-tools pulls spirv-tools_revision, configures CMake, builds Release and Debug
24 echo --all sync and build glslang, LunarGLASS, spirv-tools
Cody Northropa8ac1352015-05-12 16:23:59 -060025 goto:finish
26 )
27
28 set sync-glslang=0
29 set sync-LunarGLASS=0
Cody Northrope13dd832015-12-30 11:53:18 -070030 set sync-spirv-tools=0
Cody Northropa8ac1352015-05-12 16:23:59 -060031 set build-glslang=0
32 set build-LunarGLASS=0
Cody Northrope13dd832015-12-30 11:53:18 -070033 set build-spirv-tools=0
Cody Northropa8ac1352015-05-12 16:23:59 -060034 set check-glslang-build-dependencies=0
Cody Northropa1951362015-07-02 11:33:41 -060035 set check-LunarGLASS-fetch-dependencies=0
Cody Northropa8ac1352015-05-12 16:23:59 -060036 set check-LunarGLASS-build-dependencies=0
37
38 :parameterLoop
39
40 if "%1"=="" goto:parameterContinue
41
42 if "%1" == "--sync-glslang" (
43 set sync-glslang=1
Cody Northrop50a85122015-10-13 10:30:27 -060044 shift
45 goto:parameterLoop
Cody Northropa8ac1352015-05-12 16:23:59 -060046 )
47
48 if "%1" == "--sync-LunarGLASS" (
49 set sync-LunarGLASS=1
Cody Northropa1951362015-07-02 11:33:41 -060050 set check-LunarGLASS-fetch-dependencies=1
Cody Northropa8ac1352015-05-12 16:23:59 -060051 shift
52 goto:parameterLoop
53 )
54
Cody Northrope13dd832015-12-30 11:53:18 -070055 if "%1" == "--sync-spirv-tools" (
56 set sync-spirv-tools=1
57 shift
58 goto:parameterLoop
59 )
60
Cody Northropa8ac1352015-05-12 16:23:59 -060061 if "%1" == "--build-glslang" (
62 set sync-glslang=1
63 set check-glslang-build-dependencies=1
64 set build-glslang=1
65 shift
66 goto:parameterLoop
67 )
68
69 if "%1" == "--build-LunarGLASS" (
70 set sync-LunarGLASS=1
Cody Northropa1951362015-07-02 11:33:41 -060071 set check-LunarGLASS-fetch-dependencies=1
Cody Northropa8ac1352015-05-12 16:23:59 -060072 set check-LunarGLASS-build-dependencies=1
73 set build-LunarGLASS=1
74 shift
75 goto:parameterLoop
76 )
77
Cody Northrope13dd832015-12-30 11:53:18 -070078 if "%1" == "--build-spirv-tools" (
79 set sync-spirv-tools=1
80 REM glslang has the same needs as spirv-tools
81 set check-glslang-build-dependencies=1
82 set build-spirv-tools=1
83 shift
84 goto:parameterLoop
85 )
86
Cody Northropa8ac1352015-05-12 16:23:59 -060087 if "%1" == "--all" (
88 set sync-glslang=1
89 set sync-LunarGLASS=1
Cody Northrope13dd832015-12-30 11:53:18 -070090 set sync-spirv-tools=1
Cody Northropa8ac1352015-05-12 16:23:59 -060091 set build-glslang=1
92 set build-LunarGLASS=1
Cody Northrope13dd832015-12-30 11:53:18 -070093 set build-spirv-tools=1
Cody Northropa1951362015-07-02 11:33:41 -060094 set check-LunarGLASS-fetch-dependencies=1
Cody Northropa8ac1352015-05-12 16:23:59 -060095 set check-glslang-build-dependencies=1
96 set check-LunarGLASS-build-dependencies=1
97 shift
98 goto:parameterLoop
99 )
100
101 echo Unrecognized options "%1"
102 goto:error
103
104 :parameterContinue
105
106REM // ======== end Parameter parsing ======== //
107
108
109REM // ======== Dependency checking ======== //
Cody Northrop50a85122015-10-13 10:30:27 -0600110 REM git is required for all paths
Cody Northropa1951362015-07-02 11:33:41 -0600111 for %%X in (git.exe) do (set FOUND=%%~$PATH:X)
Cody Northropa8ac1352015-05-12 16:23:59 -0600112 if not defined FOUND (
113 echo Dependency check failed:
Cody Northropa1951362015-07-02 11:33:41 -0600114 echo git.exe not found
Cody Northrop50a85122015-10-13 10:30:27 -0600115 echo Git for Windows can be downloaded here: https://git-scm.com/download/win
Cody Northropa1951362015-07-02 11:33:41 -0600116 echo Install and ensure git.exe makes it into your PATH
Cody Northropa8ac1352015-05-12 16:23:59 -0600117 set errorCode=1
118 )
119
Cody Northropa1951362015-07-02 11:33:41 -0600120 if %check-LunarGLASS-fetch-dependencies% equ 1 (
121 for %%X in (svn.exe) do (set FOUND=%%~$PATH:X)
122 if not defined FOUND (
123 echo Dependency check failed:
124 echo svn.exe not found
125 echo Get Subversion for Windows here: http://sourceforge.net/projects/win32svn/
126 echo Install and ensure svn.exe makes it into your PATH, default is "C:\Program Files (x86)\Subversion\bin"
127 set errorCode=1
128 )
129
Cody Northropa8ac1352015-05-12 16:23:59 -0600130 for %%X in (wget.exe) do (set FOUND=%%~$PATH:X)
131 if not defined FOUND (
132 echo Dependency check failed:
133 echo wget.exe not found
134 echo Get wget for Windows here: http://gnuwin32.sourceforge.net/packages/wget.htm
135 echo Easiest to select "Complete package, except sources" link which will install and setup PATH
136 echo Install and ensure each makes it into your PATH, default is "C:\Program Files (x86)\GnuWin32\bin"
137 set errorCode=1
138 )
139
140 for %%X in (gzip.exe) do (set FOUND=%%~$PATH:X)
141 if not defined FOUND (
142 echo Dependency check failed:
143 echo gzip.exe not found
144 echo Get gzip for Windows here: http://gnuwin32.sourceforge.net/packages/gzip.htm
145 echo Easiest to select "Complete package, except sources" link which will install and setup PATH
146 echo Install and ensure each makes it into your PATH, default is "C:\Program Files (x86)\GnuWin32\bin"
147 set errorCode=1
148 )
149
150 for %%X in (tar.exe) do (set FOUND=%%~$PATH:X)
151 if not defined FOUND (
152 echo Dependency check failed:
153 echo tar.exe not found
154 echo Get tar for Windows here: http://gnuwin32.sourceforge.net/packages/gtar.htm
155 echo Easiest to select Binaries/Setup link which will install and setup PATH
156 echo Install and ensure each makes it into your PATH, default is "C:\Program Files (x86)\GnuWin32\bin"
157 set errorCode=1
158 )
159 )
160
161 if %check-glslang-build-dependencies% equ 1 (
162 for %%X in (cmake.exe) do (set FOUND=%%~$PATH:X)
163 if not defined FOUND (
164 echo Dependency check failed:
165 echo cmake.exe not found
166 echo Get CNake 2.8 for Windows here: http://www.cmake.org/cmake/resources/software.html
167 echo Install and ensure each makes it into your PATH, default is "C:\Program Files (x86)\CMake\bin"
168 set errorCode=1
169 )
170 )
171
172 if %check-LunarGLASS-build-dependencies% equ 1 (
173 for %%X in (python.exe) do (set FOUND=%%~$PATH:X)
174 if not defined FOUND (
175 echo Dependency check failed:
176 echo python.exe not found
177 echo Get python 2.7x for Windows here: http://www.python.org/download/releases/2.7.6/
178 echo Install and ensure each makes it into your PATH, default is "C:\Python27"
179 set errorCode=1
180 )
181
182 for %%X in (cmake.exe) do (set FOUND=%%~$PATH:X)
183 if not defined FOUND (
184 echo Dependency check failed:
185 echo cmake.exe not found
186 echo Get CNake 2.8 for Windows here: http://www.cmake.org/cmake/resources/software.html
187 echo Install and ensure each makes it into your PATH, default is "C:\Program Files (x86)\CMake\bin"
188 set errorCode=1
189 )
190 )
191
192 REM goto:main
193
194REM // ======== end Dependency checking ======== //
195
196:main
197
198if %errorCode% neq 0 (goto:error)
199
200REM Read the target versions from external file, which is shared with Linux script
201if not exist LunarGLASS_revision (
202 echo.
203 echo Missing LunarGLASS_revision file! Place it next to this script with target version in it.
204 set errorCode=1
205 goto:error
206)
207
208if not exist glslang_revision (
209 echo.
210 echo Missing glslang_revision file! Place it next to this script with target version in it.
211 set errorCode=1
212 goto:error
213)
214
Cody Northrope13dd832015-12-30 11:53:18 -0700215if not exist spirv-tools_revision (
216 echo.
217 echo Missing spirv-tools_revision file! Place it next to this script with target version in it.
218 set errorCode=1
219 goto:error
220)
221
Cody Northropa8ac1352015-05-12 16:23:59 -0600222set /p LUNARGLASS_REVISION= < LunarGLASS_revision
223set /p GLSLANG_REVISION= < glslang_revision
Cody Northrope13dd832015-12-30 11:53:18 -0700224set /p SPIRV_TOOLS_REVISION= < spirv-tools_revision
Cody Northropa8ac1352015-05-12 16:23:59 -0600225echo LUNARGLASS_REVISION=%LUNARGLASS_REVISION%
226echo GLSLANG_REVISION=%GLSLANG_REVISION%
Cody Northrope13dd832015-12-30 11:53:18 -0700227echo SPIRV_TOOLS_REVISION=%SPIRV_TOOLS_REVISION%
Cody Northropa8ac1352015-05-12 16:23:59 -0600228
GregF328d16c2015-09-23 11:16:44 -0600229set /p LUNARGLASS_REVISION_R32= < LunarGLASS_revision_R32
GregF328d16c2015-09-23 11:16:44 -0600230echo LUNARGLASS_REVISION_R32=%LUNARGLASS_REVISION_R32%
GregF328d16c2015-09-23 11:16:44 -0600231
Cody Northrope13dd832015-12-30 11:53:18 -0700232echo Creating and/or updating glslang, LunarGLASS, spirv-tools in %BASE_DIR%
Cody Northropa8ac1352015-05-12 16:23:59 -0600233
234if %sync-glslang% equ 1 (
GregF328d16c2015-09-23 11:16:44 -0600235 rd /S /Q %GLSLANG_DIR%
Cody Northropa8ac1352015-05-12 16:23:59 -0600236 if not exist %GLSLANG_DIR% (
237 call:create_glslang
238 )
239 if %errorCode% neq 0 (goto:error)
240 call:update_glslang
241 if %errorCode% neq 0 (goto:error)
242)
243
244if %sync-LunarGLASS% equ 1 (
Cody Northrop50a85122015-10-13 10:30:27 -0600245 rd /S /Q %LUNARGLASS_DIR%
Cody Northropa8ac1352015-05-12 16:23:59 -0600246 if not exist %LUNARGLASS_DIR% (
247 call:create_LunarGLASS
248 )
249 if %errorCode% neq 0 (goto:error)
250 call:update_LunarGLASS
251 if %errorCode% neq 0 (goto:error)
252)
253
Cody Northrope13dd832015-12-30 11:53:18 -0700254if %sync-spirv-tools% equ 1 (
255 rd /S /Q %SPIRV_TOOLS_DIR%
256 if %errorlevel% neq 0 (goto:error)
257 if not exist %SPIRV_TOOLS_DIR% (
258 call:create_spirv-tools
259 )
260 if %errorCode% neq 0 (goto:error)
261 call:update_spirv-tools
262 if %errorCode% neq 0 (goto:error)
263)
264
Cody Northropa8ac1352015-05-12 16:23:59 -0600265if %build-glslang% equ 1 (
266 call:build_glslang
267 if %errorCode% neq 0 (goto:error)
268)
269
270if %build-LunarGLASS% equ 1 (
271 call:build_LunarGLASS
272 if %errorCode% neq 0 (goto:error)
273)
274
Cody Northrope13dd832015-12-30 11:53:18 -0700275if %build-spirv-tools% equ 1 (
276 call:build_spirv-tools
277 if %errorCode% neq 0 (goto:error)
278)
279
Cody Northropa8ac1352015-05-12 16:23:59 -0600280echo.
Cody Northrope13dd832015-12-30 11:53:18 -0700281echo Exiting
Cody Northropa8ac1352015-05-12 16:23:59 -0600282goto:finish
283
284:error
285echo.
286echo Halting due to error
287goto:finish
288
289:finish
290if not "%cd%\" == "%BUILD_DIR%" ( cd %BUILD_DIR% )
291endlocal
292goto:eof
293
294
295
296REM // ======== Functions ======== //
297
298:create_glslang
Cody Northropa8ac1352015-05-12 16:23:59 -0600299 echo.
300 echo Creating local glslang repository %GLSLANG_DIR%)
301 mkdir %GLSLANG_DIR%
302 cd %GLSLANG_DIR%
Greg Fischer36b59152015-10-02 13:05:27 -0600303 git clone git@gitlab.khronos.org:GLSL/glslang.git .
Cody Northropa1951362015-07-02 11:33:41 -0600304 git checkout %GLSLANG_REVISION%
Cody Northropa8ac1352015-05-12 16:23:59 -0600305 if not exist %GLSLANG_DIR%\SPIRV (
306 echo glslang source download failed!
307 set errorCode=1
308 )
309goto:eof
310
311:update_glslang
312 echo.
313 echo Updating %GLSLANG_DIR%
314 cd %GLSLANG_DIR%
Greg Fischer124b68d2015-10-08 17:53:48 -0600315 git fetch --all
Greg Fischer36b59152015-10-02 13:05:27 -0600316 git checkout %GLSLANG_REVISION%
Cody Northropa8ac1352015-05-12 16:23:59 -0600317goto:eof
318
319:create_LunarGLASS
320 REM Windows complains if it can't find the directory below, no need to call
321 REM rd /S /Q %LUNARGLASS_DIR%
322 echo.
323 echo Creating local LunarGLASS repository %LUNARGLASS_DIR%)
Cody Northrop50a85122015-10-13 10:30:27 -0600324 mkdir %LUNARGLASS_DIR%
325 cd %LUNARGLASS_DIR%
326 git clone https://github.com/LunarG/LunarGLASS.git .
327 git checkout %LUNARGLASS_REVISION%
328 cd Core\LLVM
Cody Northropa8ac1352015-05-12 16:23:59 -0600329 echo.
330 echo Downloading LLVM archive...
331 wget http://llvm.org/releases/3.4/llvm-3.4.src.tar.gz
332 REM tar on windows can't filter through gzip, so the below line doesn't work
333 REM tar --gzip -xf llvm-3.4.src.tar.gz
334 echo.
335 echo Unzipping the archive...
336 echo gzip --decompress --verbose --keep llvm-3.4.src.tar.gz
337 gzip --decompress --verbose --keep llvm-3.4.src.tar.gz
338 echo.
339 echo Extracting the archive... (this is slow)
340 echo tar -xf llvm-3.4.src.tar
341 tar -xf llvm-3.4.src.tar
342 if not exist %LUNARGLASS_DIR%\Core\LLVM\llvm-3.4\lib (
343 echo .
344 echo LLVM source download failed!
345 echo Delete LunarGLASS directory and try again
346 set errorCode=1
347 goto:eof
348 )
349 echo.
350 echo Syncing LunarGLASS source...
351 cd %LUNARGLASS_DIR%
Cody Northrop50a85122015-10-13 10:30:27 -0600352 REM put back the LunarGLASS github versions of some LLVM files
353 git checkout -f .
354 REM overwrite with private gitlab versions of some files
355 svn checkout -r %LUNARGLASS_REVISION_R32% --force https://cvs.khronos.org/svn/repos/SPIRV/trunk/LunarGLASS/ .
356 svn revert -R .
Cody Northropa8ac1352015-05-12 16:23:59 -0600357 if not exist %LUNARGLASS_DIR%\Frontends\SPIRV (
358 echo.
359 echo LunarGLASS source download failed!
360 set errorCode=1
361 )
362goto:eof
363
364:update_LunarGLASS
365 echo.
366 echo Updating %LUNARGLASS_DIR%
367 cd %LUNARGLASS_DIR%
Cody Northrop50a85122015-10-13 10:30:27 -0600368 git fetch --all
369 git checkout -f %LUNARGLASS_REVISION% .
370 if not exist %LUNARGLASS_DIR%\.svn (
371 svn checkout -r %LUNARGLASS_REVISION_R32% --force https://cvs.khronos.org/svn/repos/SPIRV/trunk/LunarGLASS/ .
372 )
373 svn update -r %LUNARGLASS_REVISION_R325
Cody Northropa8ac1352015-05-12 16:23:59 -0600374 svn revert -R .
375goto:eof
376
Cody Northrope13dd832015-12-30 11:53:18 -0700377:create_spirv-tools
378 echo.
379 echo Creating local spirv-tools repository %SPIRV_TOOLS_DIR%)
380 mkdir %SPIRV_TOOLS_DIR%
381 cd %SPIRV_TOOLS_DIR%
David Pinedocd58eb62016-01-07 11:12:23 -0700382 git clone git@gitlab.khronos.org:spirv/spirv-tools.git .
Cody Northrope13dd832015-12-30 11:53:18 -0700383 git checkout %SPIRV_TOOLS_REVISION%
384 if not exist %SPIRV_TOOLS_DIR%\source (
385 echo spirv-tools source download failed!
386 set errorCode=1
387 )
388goto:eof
389
390:update_spirv-tools
391 echo.
392 echo Updating %SPIRV_TOOLS_DIR%
393 cd %SPIRV_TOOLS_DIR%
394 git fetch --all
395 git checkout %SPIRV_TOOLS_REVISION%
396goto:eof
397
Cody Northropa8ac1352015-05-12 16:23:59 -0600398:build_glslang
399 echo.
400 echo Building %GLSLANG_DIR%
401 cd %GLSLANG_DIR%
402 mkdir build
403 set GLSLANG_BUILD_DIR=%GLSLANG_DIR%\build
404 cd %GLSLANG_BUILD_DIR%
David Pinedocd58eb62016-01-07 11:12:23 -0700405 cmake -G"Visual Studio 12 2013 Win64" -DCMAKE_INSTALL_PREFIX=install ..
406 msbuild INSTALL.vcxproj /p:Platform=x64 /p:Configuration=Debug
Cody Northropa8ac1352015-05-12 16:23:59 -0600407 REM Check for existence of one lib, even though we should check for all results
408 if not exist %GLSLANG_BUILD_DIR%\glslang\Debug\glslang.lib (
409 echo.
410 echo glslang Debug build failed!
411 set errorCode=1
412 )
David Pinedocd58eb62016-01-07 11:12:23 -0700413 msbuild INSTALL.vcxproj /p:Platform=x64 /p:Configuration=Release
Cody Northrop50a85122015-10-13 10:30:27 -0600414 REM Check for existence of one lib, even though we should check for all results
415 if not exist %GLSLANG_BUILD_DIR%\glslang\Release\glslang.lib (
416 echo.
417 echo glslang Release build failed!
418 set errorCode=1
419 )
Cody Northropa8ac1352015-05-12 16:23:59 -0600420goto:eof
421
422:build_LunarGLASS
423 echo.
424 echo Building %LUNARGLASS_DIR%
425 set LLVM_DIR=%LUNARGLASS_DIR%\Core\LLVM\llvm-3.4
426 cd %LLVM_DIR%
427 mkdir build
428 set LLVM_BUILD_DIR=%LLVM_DIR%\build
429 cd %LLVM_BUILD_DIR%
David Pinedocd58eb62016-01-07 11:12:23 -0700430 cmake -G"Visual Studio 12 2013 Win64" -DCMAKE_INSTALL_PREFIX=install ..
431 msbuild INSTALL.vcxproj /p:Platform=x64 /p:Configuration=Release
Cody Northropa8ac1352015-05-12 16:23:59 -0600432 REM Check for existence of one lib, even though we should check for all results
433 if not exist %LLVM_BUILD_DIR%\lib\Release\LLVMCore.lib (
434 echo.
435 echo LLVM Release build failed!
436 set errorCode=1
437 goto:eof
438 )
Cody Northrop50a85122015-10-13 10:30:27 -0600439 REM disable Debug build of LLVM until LunarGLASS cmake files are updated to
440 REM handle Debug and Release builds of glslang simultaneously, instead of
441 REM whatever last lands in "./build/install"
David Pinedocd58eb62016-01-07 11:12:23 -0700442 REM msbuild INSTALL.vcxproj /p:Platform=x64 /p:Configuration=Debug
Cody Northropa8ac1352015-05-12 16:23:59 -0600443 REM Check for existence of one lib, even though we should check for all results
Cody Northrop50a85122015-10-13 10:30:27 -0600444 REM if not exist %LLVM_BUILD_DIR%\lib\Debug\LLVMCore.lib (
445 REM echo.
446 REM echo LLVM Debug build failed!
447 REM set errorCode=1
448 REM goto:eof
449 REM )
Cody Northropa8ac1352015-05-12 16:23:59 -0600450 cd %LUNARGLASS_DIR%
451 mkdir build
452 set LUNARGLASS_BUILD_DIR=%LUNARGLASS_DIR%\build
453 cd %LUNARGLASS_BUILD_DIR%
David Pinedocd58eb62016-01-07 11:12:23 -0700454 cmake -G"Visual Studio 12 2013 Win64" -DCMAKE_INSTALL_PREFIX=install ..
455 msbuild INSTALL.vcxproj /p:Platform=x64 /p:Configuration=Release
Cody Northropa8ac1352015-05-12 16:23:59 -0600456 REM Check for existence of one lib, even though we should check for all results
457 if not exist %LUNARGLASS_BUILD_DIR%\Core\Release\core.lib (
458 echo.
459 echo LunarGLASS build failed!
460 set errorCode=1
461 goto:eof
462 )
Cody Northrop50a85122015-10-13 10:30:27 -0600463 REM disable Debug build of LunarGLASS until its cmake file can be updated to
464 REM handle Debug and Release builds of glslang simultaneously, instead of
465 REM whatever last lands in "./build/install"
David Pinedocd58eb62016-01-07 11:12:23 -0700466 REM msbuild INSTALL.vcxproj /p:Platform=x64 /p:Configuration=Debug
Cody Northropa8ac1352015-05-12 16:23:59 -0600467 REM Check for existence of one lib, even though we should check for all results
Cody Northrop50a85122015-10-13 10:30:27 -0600468 REM if not exist %LUNARGLASS_BUILD_DIR%\Core\Debug\core.lib (
469 REM echo.
470 REM echo LunarGLASS build failed!
471 REM set errorCode=1
472 REM goto:eof
473 REM )
Cody Northropa8ac1352015-05-12 16:23:59 -0600474goto:eof
Cody Northrope13dd832015-12-30 11:53:18 -0700475
476:build_spirv-tools
477 echo.
478 echo Building %SPIRV_TOOLS_DIR%
479 cd %SPIRV_TOOLS_DIR%
480 mkdir build
481 set SPIRV_TOOLS_BUILD_DIR=%SPIRV_TOOLS_DIR%\build
482 cd %SPIRV_TOOLS_BUILD_DIR%
David Pinedocd58eb62016-01-07 11:12:23 -0700483 cmake -G "Visual Studio 12 2013 Win64" ..
484 msbuild ALL_BUILD.vcxproj /p:Platform=x64 /p:Configuration=Debug
Cody Northrope13dd832015-12-30 11:53:18 -0700485 REM Check for existence of one lib, even though we should check for all results
486 if not exist %SPIRV_TOOLS_BUILD_DIR%\Debug\SPIRV-Tools.lib (
487 echo.
488 echo spirv-tools Debug build failed!
489 set errorCode=1
490 )
David Pinedocd58eb62016-01-07 11:12:23 -0700491 msbuild ALL_BUILD.vcxproj /p:Platform=x64 /p:Configuration=Release
Cody Northrope13dd832015-12-30 11:53:18 -0700492 REM Check for existence of one lib, even though we should check for all results
493 if not exist %SPIRV_TOOLS_BUILD_DIR%\Release\SPIRV-Tools.lib (
494 echo.
495 echo spirv-tools Release build failed!
496 set errorCode=1
497 )
498goto:eof