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
33REM conda uses %ERRORLEVEL% but FPGA scripts can set it. So it should be reseted.
44set ERRORLEVEL =
55
@@ -8,24 +8,35 @@ set "CXX=dpcpp.exe"
88
99rmdir /S /Q build_cmake
1010mkdir build_cmake
11- cd build_cmake
1211
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% "
1516
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
1724
1825cmake -G Ninja ^
19- -DCMAKE_BUILD_TYPE=Release ^
26+ -DCMAKE_BUILD_TYPE=Debug ^
2027 " -DCMAKE_INSTALL_PREFIX=%INSTALL_PREFIX% " ^
21- " -DCMAKE_PREFIX_PATH=%CONDA_PREFIX % " ^
28+ " -DCMAKE_PREFIX_PATH=%INSTALL_PREFIX % " ^
2229 " -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% " ^
2334 " %cd% \..\backends"
24- IF %ERRORLEVEL% NEQ 0 exit 1
35+ IF %ERRORLEVEL% NEQ 0 exit /b 1
2536
2637ninja -n
2738ninja install
28- IF %ERRORLEVEL% NEQ 0 exit 1
39+ IF %ERRORLEVEL% NEQ 0 exit /b 1
2940
3041cd ..
3142xcopy install\lib\*.lib dpctl /E /Y
@@ -40,6 +51,6 @@ set "DPPL_SYCL_INTERFACE_LIBDIR=dpctl"
4051set " DPPL_SYCL_INTERFACE_INCLDIR = dpctl\include"
4152
4253python setup.py clean --all
43- python setup.py build develop
54+ python setup.py build_ext --inplace develop
4455python -m unittest dpctl.tests
45- IF %ERRORLEVEL% NEQ 0 exit 1
56+ IF %ERRORLEVEL% NEQ 0 exit /b 1
0 commit comments