-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bat
More file actions
54 lines (46 loc) · 1.28 KB
/
Copy pathbuild.bat
File metadata and controls
54 lines (46 loc) · 1.28 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
@echo off
REM Quick-start build script for CUDA Kernels on Windows
REM This script automatically sets up the MSVC environment before building
echo ========================================
echo CUDA Kernels Build Script
echo ========================================
echo.
REM Check if we're already in a VS Developer environment
where cl.exe >nul 2>&1
if %ERRORLEVEL% EQU 0 (
echo ✓ Visual Studio environment already configured
goto :build
)
echo Setting up Visual Studio 2022 environment...
echo.
REM Try to find and run vcvars64.bat
set "VCVARS=D:\APPS\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
if exist "%VCVARS%" (
call "%VCVARS%" >nul
echo ✓ Visual Studio environment configured
goto :build
) else (
echo ✗ ERROR: Could not find vcvars64.bat at:
echo %VCVARS%
echo.
echo Please update the VCVARS path in this script or run from:
echo "x64 Native Tools Command Prompt for VS 2022"
pause
exit /b 1
)
:build
echo.
echo Building all modules...
echo.
make %*
if %ERRORLEVEL% NEQ 0 (
echo.
echo ✗ Build failed with errors
pause
exit /b %ERRORLEVEL%
)
echo.
echo ========================================
echo ✓ Build completed successfully!
echo ========================================
pause