@@ -39,6 +39,8 @@ def build_backend(
39
39
40
40
if sycl_compiler_prefix is None :
41
41
oneapi_root = os .getenv ("ONEAPI_ROOT" )
42
+ if oneapi_root is None :
43
+ raise ValueError ("Environment variable ONEAPI_ROOT is not set" )
42
44
if IS_LIN :
43
45
DPCPP_ROOT = os .path .join (oneapi_root , r"compiler/latest/linux" )
44
46
elif IS_WIN :
@@ -159,14 +161,17 @@ def build_backend(
159
161
elif IS_WIN :
160
162
if os .path .exists (os .path .join (DPCPP_ROOT , "bin" , "dpcpp.exe" )):
161
163
cmake_compiler_args = [
164
+ "-DDPCTL_DPCPP_HOME_DIR=" + DPCPP_ROOT ,
165
+ "-DDPCTL_DPCPP_FROM_ONEAPI=ON" ,
162
166
"-DCMAKE_C_COMPILER:PATH="
163
167
+ os .path .join (DPCPP_ROOT , "bin" , "clang-cl.exe" ),
164
168
"-DCMAKE_CXX_COMPILER:PATH="
165
169
+ os .path .join (DPCPP_ROOT , "bin" , "dpcpp.exe" ),
166
170
]
167
171
else :
168
172
cmake_compiler_args = [
169
- "-DDPCTL_CUSTOM_DPCPP_INSTALL_DIR=" + DPCPP_ROOT ,
173
+ "-DDPCTL_DPCPP_HOME_DIR=" + DPCPP_ROOT ,
174
+ "-DDPCTL_DPCPP_FROM_ONEAPI=OFF" ,
170
175
"-DCMAKE_C_COMPILER:PATH="
171
176
+ os .path .join (DPCPP_ROOT , "bin" , "clang-cl.exe" ),
172
177
"-DCMAKE_CXX_COMPILER:PATH="
0 commit comments