Skip to content

Commit ed824e1

Browse files
committed
Link Windows SYCL example with clang driver
1 parent 27068fe commit ed824e1

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

app/SYCL/CMakeLists.txt

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
if(WIN32
2+
AND ITLABAI_SYCL_IMPLEMENTATION STREQUAL "IntelLLVM"
3+
AND ITLABAI_SYCL_ROOT
4+
AND EXISTS "${ITLABAI_SYCL_ROOT}/bin/clang++.exe")
5+
set(CMAKE_CXX_LINK_EXECUTABLE
6+
"\"${ITLABAI_SYCL_ROOT}/bin/clang++.exe\" <CMAKE_CXX_LINK_FLAGS> "
7+
"<LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
8+
endif()
9+
110
add_executable(SYCL_Example
211
sycl_example.cpp
312
)
@@ -36,10 +45,10 @@ if(WIN32 AND ITLABAI_SYCL_IMPLEMENTATION STREQUAL "IntelLLVM")
3645
"to point to the runtime import library")
3746
endif()
3847

39-
target_link_options(SYCL_Example PRIVATE /clang:-fsycl)
48+
target_link_options(SYCL_Example PRIVATE -fsycl)
4049
if(ITLABAI_SYCL_TARGETS)
4150
target_link_options(SYCL_Example PRIVATE
42-
/clang:-fsycl-targets=${ITLABAI_SYCL_TARGETS}
51+
-fsycl-targets=${ITLABAI_SYCL_TARGETS}
4352
)
4453
endif()
4554

0 commit comments

Comments
 (0)