-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bat
More file actions
37 lines (27 loc) · 921 Bytes
/
build.bat
File metadata and controls
37 lines (27 loc) · 921 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
@ECHO OFF
:: Create folders if not exist
IF NOT EXIST ..\Bin MKDIR ..\Bin
IF NOT EXIST ..\Bin\App MKDIR ..\Bin\App
IF NOT EXIST ..\Bin\Intermediate MKDIR ..\Bin\Intermediate
:: Set paths
SET ExeName=DebugMemory
SET ExePath=..\Bin\App\%ExeName%
SET PDBFiles=..\Bin\App\
SET IntermediatePath=..\Bin\Intermediate\
:: Delete files from paths
DEL /Q /S %IntermediatePath%*.* 1>NUL
DEL /Q %PDBFiles%*.pdb 2>NUL
DEL /Q %PDBFiles%*.Exe 2>NUL
DEL /Q %PDBFiles%*.ilk 2>NUL
:: Compiler flags
SET CommonCompilerFlags= /nologo /Od /Z7 /W4 /Fd%PDBFiles% /Fo%IntermediatePath% /Fe%ExePath%
SET Defines=-D_DEBUG -DWIN64
:: Linker flags
SET CommonLinkerFlags= User32.lib Kernel32.lib
:: Check if compiler is set
WHERE cl >nul 2>nul
IF %ERRORLEVEL% NEQ 0 (
CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64
)
:: Compile
call cl %CommonCompilerFlags% %Defines% build.cpp /link %CommonLinkerFlags%