@@ -12,13 +12,13 @@ endif()
1212
1313cmake_minimum_required (VERSION 3.5)
1414
15- # The `cmake_minimum_required(VERSION 3.5...3.27 )` syntax does not work with
15+ # The `cmake_minimum_required(VERSION 3.5...3.29 )` syntax does not work with
1616# some versions of VS that have a patched CMake 3.11. This forces us to emulate
1717# the behavior using the following workaround:
18- if (${CMAKE_VERSION} VERSION_LESS 3.27 )
18+ if (${CMAKE_VERSION} VERSION_LESS 3.29 )
1919 cmake_policy (VERSION ${CMAKE_MAJOR_VERSION} .${CMAKE_MINOR_VERSION} )
2020else ()
21- cmake_policy (VERSION 3.27 )
21+ cmake_policy (VERSION 3.29 )
2222endif ()
2323
2424if (_pybind11_cmp0148)
@@ -107,15 +107,25 @@ endif()
107107option (PYBIND11_INSTALL "Install pybind11 header files?" ${PYBIND11_MASTER_PROJECT} )
108108option (PYBIND11_TEST "Build pybind11 test suite?" ${PYBIND11_MASTER_PROJECT} )
109109option (PYBIND11_NOPYTHON "Disable search for Python" OFF )
110+ option (PYBIND11_DISABLE_HANDLE_TYPE_NAME_DEFAULT_IMPLEMENTATION
111+ "To enforce that a handle_type_name<> specialization exists" OFF )
110112option (PYBIND11_SIMPLE_GIL_MANAGEMENT
111113 "Use simpler GIL management logic that does not support disassociation" OFF )
114+ option (PYBIND11_NUMPY_1_ONLY
115+ "Disable NumPy 2 support to avoid changes to previous pybind11 versions." OFF )
112116set (PYBIND11_INTERNALS_VERSION
113117 ""
114118 CACHE STRING "Override the ABI version, may be used to enable the unstable ABI." )
115119
120+ if (PYBIND11_DISABLE_HANDLE_TYPE_NAME_DEFAULT_IMPLEMENTATION)
121+ add_compile_definitions (PYBIND11_DISABLE_HANDLE_TYPE_NAME_DEFAULT_IMPLEMENTATION)
122+ endif ()
116123if (PYBIND11_SIMPLE_GIL_MANAGEMENT)
117124 add_compile_definitions (PYBIND11_SIMPLE_GIL_MANAGEMENT)
118125endif ()
126+ if (PYBIND11_NUMPY_1_ONLY)
127+ add_compile_definitions (PYBIND11_NUMPY_1_ONLY)
128+ endif ()
119129
120130cmake_dependent_option(
121131 USE_PYTHON_INCLUDE_DIR
0 commit comments