We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2aa4264 commit adf89c2Copy full SHA for adf89c2
CMakeLists.txt
@@ -35,8 +35,15 @@ message(STATUS "Building in C++${CMAKE_CXX_STANDARD} mode")
35
36
find_package(Python COMPONENTS Interpreter Development)
37
38
+# Check for abiflags, so we can check for free-threaded later.
39
+execute_process(COMMAND ${Python_EXECUTABLE} -c "import sys; print(sys.abiflags, end='')"
40
+ OUTPUT_VARIABLE PYTHON_ABIFLAGS)
41
+
42
if(PYBIND11_PREFIX)
43
add_subdirectory(${PYBIND11_PREFIX} contrib/pybind11)
44
+elseif(PYTHON_ABIFLAGS STREQUAL "t")
45
+ message(STATUS "Free-threading Python found. Enabling support (needs pybind11 2.13+).")
46
+ find_package(pybind11 2.13 REQUIRED)
47
else()
48
find_package(pybind11 2.9 REQUIRED)
49
endif()
0 commit comments