Skip to content

Commit

Permalink
Fix detection of PyInterpreterState_GetID
Browse files Browse the repository at this point in the history
  • Loading branch information
althonos committed Oct 10, 2024
1 parent e6a453b commit 6407a98
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/scripts/cmake/CythonExtension.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ include(CheckCSourceCompiles)

set(SAFE_CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES}")
set(CMAKE_REQUIRED_INCLUDES "${Python_INCLUDE_DIRS}")
set(PYINTERPRETER_STATE_SOURCE
set(PYINTERPRETER_STATE_SOURCE.github/workflows/requirements.txt
"
#include <stdint.h>
#include <stdlib.h>
#include <Python.h>
int main(int argc, char *argv[]) {{
PyInterpreterState_GetID(NULL);
return 0;
}
#include <stdint.h>
#include <stdlib.h>
#include <Python.h>
int main(int argc, char *argv[]) {
PyInterpreterState_GetID(NULL);
return 0;
}
")
check_c_source_compiles("${PYINTERPRETER_STATE_SOURCE}" HAVE_PYINTERPRETERSTATE_GETID)
set(CMAKE_REQUIRED_INCLUDES "${SAFE_CMAKE_REQUIRED_INCLUDES}")
Expand Down

0 comments on commit 6407a98

Please sign in to comment.