-
Notifications
You must be signed in to change notification settings - Fork 1
/
windows_build_w_ninja_run.bat
47 lines (39 loc) · 1.18 KB
/
windows_build_w_ninja_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
@echo off
echo ======================================
echo Checking files and folders ...
if exist .\src\kernels\tyche_i.cl (
echo File ./src/kernels/tyche_i.cl found.
) else (
echo File ./src/kernels/tyche_i.cl NOT found, downloading file ...
rem curl is pre-installed on Windows 10 and later
curl -o ./src/kernels/tyche_i.cl https://raw.githubusercontent.com/bstatcomp/RandomCL/master/generators/tyche_i.cl
)
if exist output\ (
echo Folder "output" found.
) else (
echo Folder "output" NOT found, creating ...
mkdir output
)
echo ======================================
echo Building solution ...
cmake -B .\build -G Ninja
ninja -C .\build
rem Run program num_runs times
rem Number of command line arguments
set argC=0
for %%x in (%*) do Set /A argC+=1
if %argC% == 0 (
set /A num_runs=1
) else (
set /A num_runs=%1
)
echo ======================================
echo Running tests (num_runs: %num_runs%)
for /L %%y in (1, 1, %num_runs%) do (
echo --------------------------------------
echo Run %%y of %num_runs%
echo --------------------------------------
.\build\CmDockOpenCL batches\run.json
echo.
echo.
)