-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.bat
52 lines (36 loc) · 968 Bytes
/
run.bat
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
@echo off
cls
:: Batch
:: Check if CMake is installed
cmake --version > NUL
if %errorlevel% neq 0 (
echo.
echo CMake not found. Please install CMake by visiting https://cmake.org/download/.
exit /b 1
)
:: If the file does not exist
if not exist "build/cppgfx.configured" (
echo [34m[cppgfx] The project was not configured yet, configuring now...[0m
:: Create build directory
mkdir build 2> nul
:: Configure the project
cmake -S . -B build
if %errorlevel% neq 0 (
echo [cppgfx] Configuring failed
exit /b 1
)
:: Create the file
echo. > "build/cppgfx.configured"
echo [cppgfx] Configuring done
)
echo [34m[cppgfx] Building the project...[0m
:: Build the project
cmake --build build
if %errorlevel% neq 0 (
echo [91m[cppgfx] Building failed[0m
exit /b 1
)
echo [34m[cppgfx] Building done[0m
:: Run the project
echo [34m[cppgfx] Running the project...[0m
call build/run