File tree 2 files changed +25
-0
lines changed
2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -144,6 +144,24 @@ jobs:
144
144
if : " !(runner.os == 'Windows' && (matrix.python == 3.8 || matrix.python == 3.9 || matrix.python == '3.10-dev'))"
145
145
run : cmake --build build2 --target cpptest
146
146
147
+ # Third build - C++17 mode with unstable ABI
148
+ - name : Configure (unstable ABI)
149
+ run : >
150
+ cmake -S . -B build3
151
+ -DPYBIND11_WERROR=ON
152
+ -DDOWNLOAD_CATCH=ON
153
+ -DDOWNLOAD_EIGEN=ON
154
+ -DCMAKE_CXX_STANDARD=17
155
+ -DPYBIND11_INTERNALS_VERSION=10000000
156
+ "-DPYBIND11_TEST_OVERRIDE=test_call_policies.cpp;test_gil_scoped.cpp;test_thread.cpp"
157
+ ${{ matrix.args }}
158
+
159
+ - name : Build (unstable ABI)
160
+ run : cmake --build build3 -j 2
161
+
162
+ - name : Python tests (unstable ABI)
163
+ run : cmake --build build3 --target pytest
164
+
147
165
- name : Interface test
148
166
run : cmake --build build2 --target test_cmake_build
149
167
Original file line number Diff line number Diff line change @@ -89,6 +89,9 @@ endif()
89
89
option (PYBIND11_INSTALL "Install pybind11 header files?" ${PYBIND11_MASTER_PROJECT} )
90
90
option (PYBIND11_TEST "Build pybind11 test suite?" ${PYBIND11_MASTER_PROJECT} )
91
91
option (PYBIND11_NOPYTHON "Disable search for Python" OFF )
92
+ set (PYBIND11_INTERNALS_VERSION
93
+ ""
94
+ CACHE STRING "Override the ABI version, may be used to enable the unstable ABI." )
92
95
93
96
cmake_dependent_option(
94
97
USE_PYTHON_INCLUDE_DIR
@@ -183,6 +186,10 @@ if(NOT TARGET pybind11_headers)
183
186
184
187
target_compile_features (pybind11_headers INTERFACE cxx_inheriting_constructors cxx_user_literals
185
188
cxx_right_angle_brackets)
189
+ if (NOT "${PYBIND11_INTERNALS_VERSION} " STREQUAL "" )
190
+ target_compile_definitions (
191
+ pybind11_headers INTERFACE "PYBIND11_INTERNALS_VERSION=${PYBIND11_INTERNALS_VERSION} " )
192
+ endif ()
186
193
else ()
187
194
# It is invalid to install a target twice, too.
188
195
set (PYBIND11_INSTALL OFF )
You can’t perform that action at this time.
0 commit comments