-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bat
More file actions
70 lines (61 loc) · 1.45 KB
/
Copy pathbuild.bat
File metadata and controls
70 lines (61 loc) · 1.45 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
@echo off
REM Build script for Hardware Stress Test Suite
REM MIT License (c) 2026 kj-devvixon
echo ==========================================
echo Hardware Stress Test Suite - Build
echo MIT License (c) 2026 kj-devvixon
echo ==========================================
echo.
REM Check for Visual Studio
where cl >nul 2>nul
if %ERRORLEVEL% NEQ 0 (
echo Error: Visual Studio compiler not found!
echo Please run this from a Visual Studio Developer Command Prompt
echo Or install Visual Studio Build Tools
pause
exit /b 1
)
REM Create build directory
echo Creating build directory...
if not exist build mkdir build
cd build
REM Choose build type
echo.
echo Select build type:
echo 1] Debug
echo 2] Release
set /p choice="Enter choice [1-2]: "
if "%choice%"=="1" (
set BUILD_TYPE=Debug
) else (
set BUILD_TYPE=Release
)
REM Check for CMake
where cmake >nul 2>nul
if %ERRORLEVEL% NEQ 0 (
echo Error: CMake not found!
echo Download from: https://cmake.org/download/
pause
exit /b 1
)
echo.
echo Building with CMake (%BUILD_TYPE%)...
cmake -G "Visual Studio 16 2019" ..
cmake --build . --config %BUILD_TYPE%
if %ERRORLEVEL% EQU 0 (
echo.
echo [SUCCESS] Build successful!
echo Executable: .\build\%BUILD_TYPE%\stress_test.exe
echo.
set /p run="Run now? [y/N]: "
if /i "%run%"=="y" (
%BUILD_TYPE%\stress_test.exe
)
) else (
echo.
echo [FAILED] Build failed!
pause
exit /b 1
)
cd ..
pause