Skip to content

Commit e0ae32b

Browse files
pybind11 extensions in dpctl.tensor set linker flags for coverage generation
1 parent 64a7c04 commit e0ae32b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

dpctl/tensor/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,11 @@ foreach(python_module_name ${_py_trgts})
214214
${CMAKE_CURRENT_SOURCE_DIR}/libtensor/source/
215215
)
216216
target_link_options(${python_module_name} PRIVATE ${_linker_options})
217+
if(DPCTL_GENERATE_COVERAGE)
218+
target_link_options(${python_module_name}
219+
PRIVATE -fprofile-instr-generate -fcoverage-mapping
220+
)
221+
endif()
217222
if(_dpctl_sycl_targets)
218223
# make fat binary
219224
target_compile_options(

0 commit comments

Comments
 (0)