Skip to content

Commit 1500a06

Browse files
pybind11 extensions in dpctl.tensor set linker flags for coverage generation
1 parent b2604e6 commit 1500a06

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
@@ -216,6 +216,11 @@ foreach(python_module_name ${_py_trgts})
216216
${CMAKE_CURRENT_SOURCE_DIR}/libtensor/source/
217217
)
218218
target_link_options(${python_module_name} PRIVATE ${_linker_options})
219+
if(DPCTL_GENERATE_COVERAGE)
220+
target_link_options(${python_module_name}
221+
PRIVATE -fprofile-instr-generate -fcoverage-mapping
222+
)
223+
endif()
219224
if(_dpctl_sycl_targets)
220225
# make fat binary
221226
target_compile_options(

0 commit comments

Comments
 (0)