Skip to content

Commit 9d3bbab

Browse files
committed
Isolate SYCL kernel from OpenMP compile flags
1 parent c1a326e commit 9d3bbab

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

app/SYCL/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,11 @@ if(WIN32 AND ITLABAI_SYCL_IMPLEMENTATION STREQUAL "IntelLLVM")
5252
)
5353
endif()
5454
else()
55-
target_sources(SYCL_Example PRIVATE sycl_kernel.cpp)
56-
itlabai_add_sycl_to_target(TARGET SYCL_Example SOURCES
55+
add_library(SYCL_Example_kernel OBJECT sycl_kernel.cpp)
56+
itlabai_add_sycl_to_target(TARGET SYCL_Example_kernel SOURCES
5757
sycl_kernel.cpp
5858
)
59+
target_sources(SYCL_Example PRIVATE $<TARGET_OBJECTS:SYCL_Example_kernel>)
5960
endif()
6061

6162
add_test(NAME SYCL.Example COMMAND SYCL_Example)

0 commit comments

Comments
 (0)