Skip to content

Commit 631d40a

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 631d40a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

dpctl/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,10 @@ 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=1 CYTHON_PROFILE=1)
116+
target_compile_options(${_trgt} PRIVATE -fno-sycl-use-footer)
117+
endif()
114118
target_link_libraries(${_trgt} DPCTLSyclInterface)
115119
target_link_options(${_trgt} PRIVATE "LINKER:${DPCTL_LDFLAGS}")
116120
python_extension_module(${_trgt})

0 commit comments

Comments
 (0)