Skip to content

Commit 27068fe

Browse files
committed
Use compiler-driven SYCL link on Windows
1 parent cf03b4e commit 27068fe

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

app/SYCL/CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,12 @@ 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
40-
COMPILE_OPTIONS -fsycl -fsycl-host-only
41-
)
39+
target_link_options(SYCL_Example PRIVATE /clang:-fsycl)
40+
if(ITLABAI_SYCL_TARGETS)
41+
target_link_options(SYCL_Example PRIVATE
42+
/clang:-fsycl-targets=${ITLABAI_SYCL_TARGETS}
43+
)
44+
endif()
4245

4346
set(SYCL_EXAMPLE_KERNEL_OBJECT
4447
"${CMAKE_CURRENT_BINARY_DIR}/SYCL_Example.sycl_kernel.obj")

0 commit comments

Comments
 (0)