This commit is contained in:
2025-01-05 12:51:17 +00:00
parent 2daee71548
commit 595259b2cc
10 changed files with 106 additions and 105 deletions

View File

@@ -2,14 +2,16 @@
if NOT EXIST .\target mkdir .\target
set commonLinkerFlags=-opt:ref
set commonCompilerFlags=^
set LIBRARIES_ROOT="C:\source\libs"
set INCLUDE_ROOT="C:\source\libs\include"
set LINK_LIBRARIES=".\glfw\glfw3.lib" "user32.lib" "gdi32.lib" "opengl32.lib" "shell32.lib" "kernel32.lib"
set COMMON_LINKER_FLAGS=-opt:ref /LIBPATH:%LIBRARIES_ROOT% /NODEFAULTLIB:libcmt.lib
set COMMON_COMPILER_FLAGS=^
-MT %= Make sure the C runtime library is statically linked =%^
-Gm- %= Turns off incremental 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^
@@ -17,7 +19,7 @@ set commonCompilerFlags=^
-Zi %= Generate debugger info =%
pushd .\target
cl %commonCompilerFlags% -Fe:.\app.exe ..\app.cpp /link -incremental:no %commonLinkerFlags%
cl %COMMON_COMPILER_FLAGS% /EHsc /I %INCLUDE_ROOT% -Fe:.\somaesque.exe ..\src\main.cpp /link -incremental:no %COMMON_LINKER_FLAGS% %LINK_LIBRARIES%
popd
exit /b