-
Notifications
You must be signed in to change notification settings - Fork 2
/
build_cpp.bat
35 lines (27 loc) · 1.12 KB
/
build_cpp.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
@echo off
set unity_path=%CD%
set target=%1
set whisper_path=%2
IF "%target%"=="cpu" goto cpu
IF "%target%"=="cuda" goto cuda
IF "%target%"=="all" goto cpu
echo Unknown target %target%, should "cpu", "cuda" or "all"
goto commonexit
:cpu
echo Starting building cpu target...
cd %whisper_path%
rmdir .\build /s /q
cmake -S . -B ./build -A x64 -DCMAKE_BUILD_TYPE=Release -DWHISPER_BUILD_TESTS=OFF -DWHISPER_BUILD_EXAMPLES=OFF
cd ./build
msbuild ALL_BUILD.vcxproj -t:build -p:configuration=Release -p:platform=x64
xcopy /y /q .\bin\Release\whisper.dll %unity_path%\Packages\com.whisper.unity\Plugins\Windows\libwhisper.dll*
IF NOT "%target%"=="all" goto commonexit
:cuda
echo Starting building CUDA target...
cd %whisper_path%
rmdir .\build /s /q
cmake -S . -B ./build -A x64 -DWHISPER_CUBLAS=ON -DCMAKE_BUILD_TYPE=Release -DWHISPER_BUILD_TESTS=OFF -DWHISPER_BUILD_EXAMPLES=OFF
cd ./build
msbuild ALL_BUILD.vcxproj -t:build -p:configuration=Release -p:platform=x64
xcopy /y /q .\bin\Release\whisper.dll %unity_path%\Packages\com.whisper.unity\Plugins\Windows\libwhisper_cuda.dll*
:commonexit