Skip to content

Commit 5630a80

Browse files
CYTHON_TRACE must be set when generating coverage
Setting of this proprocessor variable went missing in the move to cmake + scikit-build, resulting in coverage not going through Cython files anymore. This change should restore that, and thus improve the coverage percentage.
1 parent 8b17f1c commit 5630a80

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

dpctl/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ function(build_dpctl_ext _trgt _src _dest)
111111
add_library(${_trgt} MODULE ${_generated_src})
112112
target_include_directories(${_trgt} PRIVATE ${NumPy_INCLUDE_DIR} ${DPCTL_INCLUDE_DIR})
113113
add_dependencies(${_trgt} _build_time_create_dpctl_include)
114+
if(DPCTL_GENERATE_COVERAGE)
115+
target_compile_definitions(${_trgt} PRIVATE CYTHON_TRACE)
116+
endif()
114117
target_link_libraries(${_trgt} DPCTLSyclInterface)
115118
target_link_options(${_trgt} PRIVATE "LINKER:${DPCTL_LDFLAGS}")
116119
python_extension_module(${_trgt})

0 commit comments

Comments
 (0)