File tree Expand file tree Collapse file tree 3 files changed +14
-6
lines changed
Expand file tree Collapse file tree 3 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,10 @@ option(DPCTL_GENERATE_COVERAGE
1717 "Build dpctl with coverage instrumentation"
1818 OFF
1919)
20+ option (DPCTL_GENERATE_COVERAGE_FOR_PYBIND11_EXTENSIONS
21+ "Build dpctl pybind11 offloading extensions with coverage instrumentation"
22+ OFF
23+ )
2024option (DPCTL_TARGET_CUDA
2125 "Build DPCTL to target CUDA devices"
2226 OFF
Original file line number Diff line number Diff line change @@ -215,9 +215,11 @@ foreach(python_module_name ${_py_trgts})
215215 )
216216 target_link_options (${python_module_name} PRIVATE ${_linker_options} )
217217 if (DPCTL_GENERATE_COVERAGE)
218- target_compile_options (${python_module_name}
219- PRIVATE -fprofile-instr-generate -fcoverage-mapping
220- )
218+ if (DPCTL_GENERATE_COVERAGE_FOR_PYBIND11_EXTENSIONS)
219+ target_compile_options (${python_module_name}
220+ PRIVATE -fprofile-instr-generate -fcoverage-mapping
221+ )
222+ endif ()
221223 target_link_options (${python_module_name}
222224 PRIVATE -fprofile-instr-generate -fcoverage-mapping
223225 )
Original file line number Diff line number Diff line change @@ -22,9 +22,11 @@ pybind11_add_module(${python_module_name} MODULE
2222)
2323add_sycl_to_target(TARGET ${python_module_name} SOURCES ${_module_src} )
2424if (DPCTL_GENERATE_COVERAGE)
25- target_compile_options (${python_module_name}
26- PRIVATE -fprofile-instr-generate -fcoverage-mapping
27- )
25+ if (DPCTL_GENERATE_COVERAGE_FOR_PYBIND11_EXTENSIONS)
26+ target_compile_options (${python_module_name}
27+ PRIVATE -fprofile-instr-generate -fcoverage-mapping
28+ )
29+ endif ()
2830 target_link_options (${python_module_name}
2931 PRIVATE -fprofile-instr-generate -fcoverage-mapping
3032 )
You can’t perform that action at this time.
0 commit comments