-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.bat
25 lines (19 loc) · 1.18 KB
/
build.bat
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
@echo off
if defined TRAVIS_TAG ( set "version=%TRAVIS_TAG%" ) else ( set "version=local" )
set build_tools="C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat"
set out_dir=build\debug
set compilerflags=/GL /Gy /Zi /Gm- /sdl /Fd"%out_dir%\vc141.pdb" /Zc:inline /MD /EHsc /nologo /Fo"%out_dir%/"
set linkerflags=/PDB:"%out_dir%/OH2RulesGenerator.pdb" /DEBUG /OPT:REF /OPT:ICF
md %out_dir%
call %build_tools% x64
cl.exe %compilerflags% src\*.cpp /link %linkerflags% /OUT:"%out_dir%\OH2RulesGenerator-%version%-win32-%VSCMD_ARG_TGT_ARCH%.exe"
call %build_tools% x86
cl.exe %compilerflags% src\*.cpp /link %linkerflags% /OUT:"%out_dir%\OH2RulesGenerator-%version%-win32-%VSCMD_ARG_TGT_ARCH%.exe"
set out_dir=build\release
set compilerflags=/GL /Gy /Gm- /Ox /sdl /Zc:inline /Oi /MD /EHsc /nologo /Fo"%out_dir%/"
set linkerflags=/OPT:REF /OPT:ICF
md %out_dir%
call %build_tools% x64
cl.exe %compilerflags% src\*.cpp /link %linkerflags% /OUT:"%out_dir%\OH2RulesGenerator-%version%-win32-%VSCMD_ARG_TGT_ARCH%.exe"
call %build_tools% x86
cl.exe %compilerflags% src\*.cpp /link %linkerflags% /OUT:"%out_dir%\OH2RulesGenerator-%version%-win32-%VSCMD_ARG_TGT_ARCH%.exe"