Skip to content

Commit 74613eb

Browse files
authored
Fixes to get cmake working on windows. (#161)
* Fixes to get cmake working on windows. * Update bld.bat
1 parent 61e879d commit 74613eb

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

backends/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function (check_for_dpcpp)
1313
set (dpcpp_cmd "${DPCPP_ROOT}/bin/dpcpp")
1414
set (dpcpp_arg "--version")
1515
elseif(UNIX)
16-
set (dpcpp_cmd "dpcpp")
16+
set (dpcpp_cmd "${DPCPP_ROOT}/bin/dpcpp")
1717
set (dpcpp_arg "--version")
1818
else()
1919
message(FATAL_ERROR "Unsupported system.")

conda-recipe/bld.bat

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
call "%ONEAPI_ROOT%compiler\latest\env\vars.bat"
2-
IF ERRORLEVEL 1 exit /b 1
1+
call "%ONEAPI_ROOT%\compiler\latest\env\vars.bat"
2+
IF %ERRORLEVEL% NEQ 0 (
3+
echo "oneAPI compiler activation failed"
4+
exit /b 1
5+
)
36
REM conda uses %ERRORLEVEL% but FPGA scripts can set it. So it should be reseted.
47
set ERRORLEVEL=
58

@@ -10,7 +13,7 @@ rmdir /S /Q build_cmake
1013
mkdir build_cmake
1114
cd build_cmake
1215

13-
set "DPCPP_ROOT=%ONEAPI_ROOT%compiler\latest\windows"
16+
set "DPCPP_ROOT=%ONEAPI_ROOT%\compiler\latest\windows"
1417
set "INSTALL_PREFIX=%cd%\..\install"
1518

1619
rmdir /S /Q "%INSTALL_PREFIX%"
@@ -20,7 +23,7 @@ cmake -G Ninja ^
2023
"-DCMAKE_INSTALL_PREFIX=%INSTALL_PREFIX%" ^
2124
"-DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX%" ^
2225
"-DDPCPP_ROOT=%DPCPP_ROOT%" ^
23-
"%SRC_DIR%/backends"
26+
"%SRC_DIR%\backends"
2427
IF %ERRORLEVEL% NEQ 0 exit /b 1
2528

2629
ninja -n

conda-recipe/run_test.bat

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
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% NEQ 0 (
3+
echo "oneAPI compiler activation failed%"
4+
exit /b 1
5+
)
36
REM conda uses %ERRORLEVEL% but FPGA scripts can set it. So it should be reseted.
47
set ERRORLEVEL=
58

69
@echo on
710

811
"%PYTHON%" -c "import dpctl"
9-
IF %ERRORLEVEL% NEQ 0 exit 1
12+
IF %ERRORLEVEL% NEQ 0 exit /b 1
1013

1114
"%PYTHON%" -m unittest -v dpctl.tests
12-
IF %ERRORLEVEL% NEQ 0 exit 1
15+
IF %ERRORLEVEL% NEQ 0 exit /b 1

0 commit comments

Comments
 (0)