add lab3
This commit is contained in:
38
lab3/make.bat
Normal file
38
lab3/make.bat
Normal file
@@ -0,0 +1,38 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
set "CALLER_DIR=%cd%"
|
||||
set "SCRIPT_DIR=%~dp0"
|
||||
set "VSDEVCMD=C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat"
|
||||
|
||||
if /I "%~1"=="clean" goto clean
|
||||
|
||||
if not exist "%VSDEVCMD%" (
|
||||
echo VsDevCmd.bat not found:
|
||||
echo %VSDEVCMD%
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
call "%VSDEVCMD%"
|
||||
if errorlevel 1 exit /b 1
|
||||
|
||||
cd /d "%SCRIPT_DIR%"
|
||||
|
||||
cl /EHsc /W3 /O2 /Fe:subdivide_grid.exe subdivide_grid.cpp grid2DIO.cpp writeGrid2DOFF.cpp
|
||||
cl /EHsc /W3 /O2 /Fe:grid2off.exe grid2off.cpp grid2DIO.cpp writeGrid2DOFF.cpp
|
||||
cl /EHsc /W3 /O2 /Fe:print_grid2D.exe print_grid2D.cpp grid2DIO.cpp
|
||||
cl /EHsc /W3 /O2 /Fe:test_grid2DIO.exe test_grid2DIO.cpp grid2DIO.cpp
|
||||
|
||||
cd /d "%CALLER_DIR%"
|
||||
endlocal
|
||||
exit /b 0
|
||||
|
||||
:clean
|
||||
cd /d "%SCRIPT_DIR%"
|
||||
del /q subdivide_grid.exe subdivide_grid.obj grid2DIO.obj writeGrid2DOFF.obj subdivide_grid.pdb vc140.pdb vc140.idb subdivide_grid.ilk 2>nul
|
||||
del /q grid2off.exe grid2off.obj 2>nul
|
||||
del /q print_grid2D.exe print_grid2D.obj 2>nul
|
||||
del /q test_grid2DIO.exe test_grid2DIO.obj 2>nul
|
||||
cd /d "%CALLER_DIR%"
|
||||
endlocal
|
||||
exit /b 0
|
||||
Reference in New Issue
Block a user