File tree 3 files changed +14
-6
lines changed
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
17
17
"Build dpctl with coverage instrumentation"
18
18
OFF
19
19
)
20
+ option (DPCTL_GENERATE_COVERAGE_FOR_PYBIND11_EXTENSIONS
21
+ "Build dpctl pybind11 offloading extensions with coverage instrumentation"
22
+ OFF
23
+ )
20
24
option (DPCTL_TARGET_CUDA
21
25
"Build DPCTL to target CUDA devices"
22
26
OFF
Original file line number Diff line number Diff line change @@ -215,9 +215,11 @@ foreach(python_module_name ${_py_trgts})
215
215
)
216
216
target_link_options (${python_module_name} PRIVATE ${_linker_options} )
217
217
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 ()
221
223
target_link_options (${python_module_name}
222
224
PRIVATE -fprofile-instr-generate -fcoverage-mapping
223
225
)
Original file line number Diff line number Diff line change @@ -22,9 +22,11 @@ pybind11_add_module(${python_module_name} MODULE
22
22
)
23
23
add_sycl_to_target(TARGET ${python_module_name} SOURCES ${_module_src} )
24
24
if (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 ()
28
30
target_link_options (${python_module_name}
29
31
PRIVATE -fprofile-instr-generate -fcoverage-mapping
30
32
)
You can’t perform that action at this time.
0 commit comments