From aa950d7e2abc4f6cd5bbfce05f22d1c572253d42 Mon Sep 17 00:00:00 2001 From: David Gardner Date: Thu, 6 Mar 2025 08:40:29 -0800 Subject: [PATCH] Add comment explaining the PYBIND11_NO_ASSERT_GIL_HELD_INCREF_DECREF Signed-off-by: David Gardner --- python/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 4c967890d..64891386a 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -15,6 +15,8 @@ list(APPEND CMAKE_MESSAGE_CONTEXT "python") +# Disable the assert that checks for the GIL being held during incref/decref +# https://pybind11.readthedocs.io/en/stable/changelog.html#version-2-11-1-july-17-2023 add_compile_definitions("PYBIND11_NO_ASSERT_GIL_HELD_INCREF_DECREF=1") if (MORPHEUS_BUILD_MORPHEUS_CORE)