Skip to content

Commit e734855

Browse files
committed
Compile Windows SYCL host source in SYCL mode
1 parent 1cdb8ed commit e734855

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

app/SYCL/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ if(WIN32 AND ITLABAI_SYCL_IMPLEMENTATION STREQUAL "IntelLLVM")
3636
"to point to the runtime import library")
3737
endif()
3838

39+
set_property(SOURCE sycl_example.cpp APPEND PROPERTY COMPILE_OPTIONS -fsycl)
40+
if(ITLABAI_SYCL_TARGETS)
41+
set_property(SOURCE sycl_example.cpp APPEND PROPERTY
42+
COMPILE_OPTIONS -fsycl-targets=${ITLABAI_SYCL_TARGETS}
43+
)
44+
endif()
45+
3946
set(SYCL_EXAMPLE_KERNEL_OBJECT
4047
"${CMAKE_CURRENT_BINARY_DIR}/SYCL_Example.sycl_kernel.obj")
4148
set(SYCL_KERNEL_COMPILE_COMMAND

0 commit comments

Comments
 (0)