28 lines
1.4 KiB
Batchfile
28 lines
1.4 KiB
Batchfile
@echo off
|
|
|
|
if NOT EXIST .\target mkdir .\target
|
|
|
|
set commonLinkerFlags=-opt:ref
|
|
set commonCompilerFlags=^
|
|
-MT %= Make sure the C runtime library is statically linked =%^
|
|
-Gm- %= Turns off incremently building =%^
|
|
-nologo %= No one cares you made the compiler Microsoft =%^
|
|
-Oi %= Always use intrinsics =%^
|
|
-EHa- %= Disable exception handling =%^
|
|
-GR- %= Never use runtime type info from C++ =%^
|
|
-WX -W4 -wd4201 -wd4100 -wd4189 -wd4505 %= Compiler warnings, -WX warnings as errors, -W4 warning level 4, -wdXXXX disable warning XXXX =%^
|
|
-DAPP_DEBUG=0 -DENABLE_ASSERT=1 -DOS_WINDOWS=1 %= Custom #defines =%^
|
|
-D_CRT_SECURE_NO_WARNINGS=1^
|
|
-FC %= Full path of source code file in diagnostics =%^
|
|
-Zi %= Generate debugger info =%
|
|
|
|
pushd .\target
|
|
cl %commonCompilerFlags% -Fe:.\app.exe ..\app.cpp /link -incremental:no %commonLinkerFlags%
|
|
popd
|
|
|
|
exit /b
|
|
|
|
:error
|
|
echo Failed with error #%errorlevel%.
|
|
exit /b %errorlevel%
|