-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bat
More file actions
44 lines (34 loc) · 893 Bytes
/
Copy pathbuild.bat
File metadata and controls
44 lines (34 loc) · 893 Bytes
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
@echo off
setlocal
set NUM_CORES=4
echo Cleaning the build folder...
if exist build (
rmdir /s /q build
)
echo Creating new build folder...
mkdir build
cd build
echo Starting CMake configuration...
cmake ..
if errorlevel 1 goto error_handler
echo Building the project...
if defined NUM_CORES (
cmake --build . --config Release -j%NUM_CORES%
) else (
cmake --build . --config Release
)
if errorlevel 1 goto error_handler
echo.
echo =======================================================
echo Build completed successfully.
echo Application files are located in the build\Release\ directory.
echo =======================================================
goto end
:error_handler
echo.
echo =======================================================
echo ERROR: CMake configuration or build failed.
echo =======================================================
:end
endlocal
pause