-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.bat
32 lines (27 loc) · 1.27 KB
/
build.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
@ECHO OFF
rem CMake settings for using Visual Studio (you may need to chnage the
rem VS version with one from the list in 'cmake --help'. You may also need
rem point the VCPKG_PATH to a correct one where you have all needed libs
set BUILDTYPE=Release
set KERNEL_NAME=gb_fp
set VSVERSION="Visual Studio 17 2022"
set BUILD_DEF=-DCMAKE_BUILD_TYPE=%BUILDTYPE%
set VCPKG_PATH=C:/src/vcpkg
set VCPKG_TRIPLET=-DVCPKG_TARGET_TRIPLET=x64-windows
rem In case you need to use a custom OpenCL implementation, update this (OFF, or ON and fill values)
set CUSTOM_OPENCL=OFF
set CUSTOM_OPENCL_INC_DIR=%OCL_ROOT%\include
set CUSTOM_OPENCL_LIB_PATH=%OCL_ROOT%\lib\x86_64\OpenCL.lib
rem Prepare JAVA paths
SET JAVA_HOME=%cd:\=/%/kernel-driver/lib/ltl2dpa/GraalVM/graalvm-ce-java11-20.1.0
rem Remove any old build
IF NOT EXIST .\build GOTO BUILDING
rmdir /S/Q .\build
rem Building ....
:BUILDING
set vcpkg=-DCMAKE_TOOLCHAIN_FILE=%VCPKG_PATH%/scripts/buildsystems/vcpkg.cmake
mkdir build
cd build
cmake .. -Wno-dev -Wno-deprecated %BUILD_DEF% %vcpkg% %VCPKG_TRIPLET% -G %VSVERSION% -DKERNEL=%KERNEL_NAME% -DCUSTOM_OPENCL:BOOL=%CUSTOM_OPENCL% -DCUSTOM_OPENCL_INC_DIR="%CUSTOM_OPENCL_INC_DIR%" -DCUSTOM_OPENCL_LIB_PATH="%CUSTOM_OPENCL_LIB_PATH%" -DJAVA_HOME="%JAVA_HOME%"
cmake --build . --config %BUILDTYPE%
cd ..