Skip to content

Commit e740d55

Browse files
Do not override -fsycl
1 parent cb99d4c commit e740d55

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

examples/pybind11/onemkl_gemv/CMakeLists.txt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,14 @@ target_link_libraries(${py_module_name}
5151
install(TARGETS ${py_module_name} DESTINATION sycl_gemm)
5252
target_include_directories(${py_module_name} PUBLIC ${Dpctl_INCLUDE_DIRS})
5353

54-
get_target_property(_sycl_gemm_sources ${py_module_name} SOURCES)
55-
set_source_files_properties(${_sycl_gemm_sources}
56-
PROPERTIES
57-
COMPILE_OPTIONS "-O3"
58-
)
54+
foreach(_src_fn ${_sources})
55+
get_source_file_property(_compile_options ${_src_fn} COMPILE_OPTIONS)
56+
set(_combined_options ${_compile_options} "-O3")
57+
set_source_files_properties(${_src_fn}
58+
PROPERTIES
59+
COMPILE_OPTIONS ${_combined_options}
60+
)
61+
endforeach()
5962
target_link_options(${py_module_name} PRIVATE -fsycl-device-code-split=per_kernel)
6063

6164
add_executable(standalone_cpp

0 commit comments

Comments
 (0)