Skip to content

Commit

Permalink
Fix some Cython extension definitions and defines in `CythonExtension…
Browse files Browse the repository at this point in the history
….cmake`
  • Loading branch information
althonos committed Oct 18, 2024
1 parent be2eabf commit 629c3f0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/scripts/cmake/CythonExtension.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ if(CMAKE_BUILD_TYPE STREQUAL Debug)
else()
set(CYTHON_DIRECTIVES
${CYTHON_DIRECTIVES}
-X boundscheck=True
-X wraparound=True
-X boundscheck=False
-X wraparound=False
)
endif()

Expand Down Expand Up @@ -110,8 +110,10 @@ macro(cython_extension _name)

if(CMAKE_BUILD_TYPE STREQUAL Debug)
if(NOT Python_INTERPRETER_ID STREQUAL PyPy)
target_compile_definitions(${_target} PUBLIC CYTHON_TRACE=1)
target_compile_definitions(${_target} PUBLIC CYTHON_TRACE_NOGIL=1)
endif()
else()
target_compile_definitions(${_target} PUBLIC CYTHON_WITHOUT_ASSERTIONS=1)
endif()

# Preserve the relative project structure in the install directory
Expand Down

0 comments on commit 629c3f0

Please sign in to comment.