1
- call " %ONEAPI_ROOT% compiler\latest\env\vars.bat"
2
- IF ERRORLEVEL 1 exit 1
1
+ call " %ONEAPI_ROOT% \ compiler\latest\env\vars.bat"
2
+ IF ERRORLEVEL 1 exit /b 1
3
3
REM conda uses %ERRORLEVEL% but FPGA scripts can set it. So it should be reseted.
4
4
set ERRORLEVEL =
5
5
@@ -8,24 +8,35 @@ set "CXX=dpcpp.exe"
8
8
9
9
rmdir /S /Q build_cmake
10
10
mkdir build_cmake
11
- cd build_cmake
12
11
13
- set " DPCPP_ROOT = %ONEAPI_ROOT% compiler\latest\windows"
14
- set " INSTALL_PREFIX = %cd% \..\install"
12
+ rmdir /S /Q install
13
+ mkdir install
14
+ cd install
15
+ set " INSTALL_PREFIX = %cd% "
15
16
16
- rmdir /S /Q " %INSTALL_PREFIX% "
17
+ cd ..\build_cmake
18
+
19
+ set " DPCPP_ROOT = %ONEAPI_ROOT% \compiler\latest\windows"
20
+ set NUMPY_INC =
21
+ for /f " delims=" %%a in ('%CONDA_PREFIX% \python.exe -c " import numpy; print(numpy.get_include())" ') do @ set NUMPY_INC = %%a
22
+ set PYTHON_INC =
23
+ for /f " delims=" %%a in ('%CONDA_PREFIX% \python.exe -c " import distutils.sysconfig as sc; print(sc.get_python_inc())" ') do @ set PYTHON_INC = %%a
17
24
18
25
cmake -G Ninja ^
19
- -DCMAKE_BUILD_TYPE=Release ^
26
+ -DCMAKE_BUILD_TYPE=Debug ^
20
27
" -DCMAKE_INSTALL_PREFIX=%INSTALL_PREFIX% " ^
21
- " -DCMAKE_PREFIX_PATH=%CONDA_PREFIX % " ^
28
+ " -DCMAKE_PREFIX_PATH=%INSTALL_PREFIX % " ^
22
29
" -DDPCPP_ROOT=%DPCPP_ROOT% " ^
30
+ " -DPYTHON_INCLUDE_DIR=%PYTHON_INC% " ^
31
+ " -DGTEST_INCLUDE_DIR=%CONDA_PREFIX\Library\include" ^
32
+ " -DGTEST_LIB_DIR=%CONDA_PREFIX% \Library\lib" ^
33
+ " -DNUMPY_INCLUDE_DIR=%NUMPY_DIR% " ^
23
34
" %cd% \..\backends"
24
- IF %ERRORLEVEL% NEQ 0 exit 1
35
+ IF %ERRORLEVEL% NEQ 0 exit /b 1
25
36
26
37
ninja -n
27
38
ninja install
28
- IF %ERRORLEVEL% NEQ 0 exit 1
39
+ IF %ERRORLEVEL% NEQ 0 exit /b 1
29
40
30
41
cd ..
31
42
xcopy install\lib\*.lib dpctl /E /Y
@@ -40,6 +51,6 @@ set "DPPL_SYCL_INTERFACE_LIBDIR=dpctl"
40
51
set " DPPL_SYCL_INTERFACE_INCLDIR = dpctl\include"
41
52
42
53
python setup.py clean --all
43
- python setup.py build develop
54
+ python setup.py build_ext --inplace develop
44
55
python -m unittest dpctl.tests
45
- IF %ERRORLEVEL% NEQ 0 exit 1
56
+ IF %ERRORLEVEL% NEQ 0 exit /b 1
0 commit comments