This repository was archived by the owner on Mar 11, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.bat
More file actions
55 lines (43 loc) · 1.27 KB
/
Copy pathbuild.bat
File metadata and controls
55 lines (43 loc) · 1.27 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
REM SPDX-FileCopyrightText: 2026 Michelangelo Secondo <michelangelo AT secondo DOT aero>
REM
REM SPDX-License-Identifier: CC0-1.0
@echo off
cd /d "%~dp0"
:: Force English compiler output
set VSLANG=1033
echo ========================================
echo Building C++ Extension (_cpp_force_kernel)
echo ========================================
echo [1/4] Cleaning...
if exist build rmdir /s /q build 2>nul
if exist src\project\simulation\cpp_force_kernel\_cpp_force_kernel.pyd del src\project\simulation\cpp_force_kernel\_cpp_force_kernel.pyd 2>nul
echo [2/4] Configuring...
mkdir build 2>nul
cd build
cmake ../src/cpp -G "MinGW Makefiles"
if %errorlevel% neq 0 (
echo.
echo ERROR: CMake failed!
pause
exit /b 1
)
echo [3/4] Building...
cmake --build . --config Release
if %errorlevel% neq 0 (
echo ERROR: Build failed!
pause
exit /b 1
)
echo [4/4] Copying...
cd ..
copy build\Release\_cpp_force_kernel.pyd src\project\simulation\cpp_force_kernel\ 2>nul
if exist src\project\simulation\cpp_force_kernel\_cpp_force_kernel.pyd (
echo.
echo SUCCESS! Built: src\project\simulation\cpp_force_kernel\_cpp_force_kernel.pyd
) else (
echo ERROR: _cpp_force_kernel.pyd not created!
echo Check build\Release\ directory...
dir build\Release
)
echo.
pause