-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake.bat
More file actions
31 lines (24 loc) · 675 Bytes
/
Copy pathmake.bat
File metadata and controls
31 lines (24 loc) · 675 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
@echo off
setlocal
REM Define the build directory
set "BUILD_DIR=build"
REM Create the build directory if it doesn't exist
if not exist "%BUILD_DIR%" (
mkdir "%BUILD_DIR%"
)
REM Navigate to the build directory
cd "%BUILD_DIR%"
REM Run CMake configuration with Ninja, using Clang as the compiler
cmake -G "Ninja" -DCMAKE_TOOLCHAIN_FILE=../toolchain.cmake ..
if %errorlevel% neq 0 (
echo Configuration failed.
exit /b %errorlevel%
)
REM Build with Ninja, enabling parallel compilation
cmake --build . -- -j %NUMBER_OF_PROCESSORS%
if %errorlevel% neq 0 (
echo Build failed.
exit /b %errorlevel%
)
REM Notify success
echo Build completed successfully.