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 @@ -217,9 +217,11 @@ foreach(python_module_name ${_py_trgts})
217217 )
218218 target_link_options (${python_module_name} PRIVATE ${_linker_options} )
219219 if (DPCTL_GENERATE_COVERAGE)
220- target_compile_options (${python_module_name}
221- PRIVATE -fprofile-instr-generate -fcoverage-mapping
222- )
220+ if (DPCTL_GENERATE_COVERAGE_FOR_PYBIND11_EXTENSIONS)
221+ target_compile_options (${python_module_name}
222+ PRIVATE -fprofile-instr-generate -fcoverage-mapping
223+ )
224+ endif ()
223225 target_link_options (${python_module_name}
224226 PRIVATE -fprofile-instr-generate -fcoverage-mapping
225227 )
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