Skip to content
Snippets Groups Projects
Commit bbb4d328 authored by Martin Larralde's avatar Martin Larralde
Browse files

Disable Cython `linetrace` when compiling for PyPy

parent 34cd5715
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,7 @@ foreach(i RANGE 0 49)
add_custom_command(
OUTPUT training${i}.c
COMMENT
"Extracting initialize_metagenome_${index} from training.c"
"Extracting initialize_metagenome_${i} from training.c"
COMMAND
Python::Interpreter ${CMAKE_CURRENT_LIST_DIR}/../scripts/split_training.py
-i ${CMAKE_CURRENT_LIST_DIR}/training.c
......
......@@ -52,8 +52,13 @@ if(CMAKE_BUILD_TYPE STREQUAL Debug)
-X warn.unused_arg=True
-X warn.unused_result=True
-X warn.multiple_declarators=True
-X linetrace=true
)
if(NOT Python_INTERPRETER_ID STREQUAL PyPy)
set(CYTHON_DIRECTIVES
${CYTHON_DIRECTIVES}
-X linetrace=true
)
endif()
else()
set(CYTHON_DIRECTIVES
${CYTHON_DIRECTIVES}
......@@ -98,7 +103,9 @@ macro(cython_extension _name)
target_link_libraries(${_target} PUBLIC ${CYTHON_EXTENSION_LINKS})
if(CMAKE_BUILD_TYPE STREQUAL Debug)
target_compile_definitions(${_target} PUBLIC CYTHON_TRACE=1)
if(NOT Python_INTERPRETER_ID STREQUAL PyPy)
target_compile_definitions(${_target} PUBLIC CYTHON_TRACE=1)
endif()
endif()
# Preserve the relative project structure in the install directory
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment