Commit 463953bc96ead56227ef3dbf62639eb7e3545ab4
Committed by
GitHub
Merge pull request #992 from jberkenbilt/future
Future
Showing
5 changed files
with
35 additions
and
0 deletions
CMakeLists.txt
| @@ -104,6 +104,8 @@ option(INSTALL_PKGCONFIG "Install pkgconfig file" ON) | @@ -104,6 +104,8 @@ option(INSTALL_PKGCONFIG "Install pkgconfig file" ON) | ||
| 104 | option(INSTALL_CMAKE_PACKAGE "Install cmake package files" ON) | 104 | option(INSTALL_CMAKE_PACKAGE "Install cmake package files" ON) |
| 105 | option(INSTALL_EXAMPLES "Install example files" ON) | 105 | option(INSTALL_EXAMPLES "Install example files" ON) |
| 106 | 106 | ||
| 107 | +option(FUTURE "Include ABI-breaking changes CONSIDERED for the next major release" OFF) | ||
| 108 | + | ||
| 107 | # *** END OPTIONS *** | 109 | # *** END OPTIONS *** |
| 108 | 110 | ||
| 109 | if(NOT (BUILD_STATIC_LIBS OR BUILD_SHARED_LIBS)) | 111 | if(NOT (BUILD_STATIC_LIBS OR BUILD_SHARED_LIBS)) |
| @@ -121,6 +123,10 @@ else() | @@ -121,6 +123,10 @@ else() | ||
| 121 | set(ENABLE_QTC_ARG --disable-tc) | 123 | set(ENABLE_QTC_ARG --disable-tc) |
| 122 | endif() | 124 | endif() |
| 123 | 125 | ||
| 126 | +if(FUTURE) | ||
| 127 | + add_compile_definitions(QPDF_FUTURE=1) | ||
| 128 | +endif() | ||
| 129 | + | ||
| 124 | enable_testing() | 130 | enable_testing() |
| 125 | set(RUN_QTEST perl ${qpdf_SOURCE_DIR}/run-qtest ${ENABLE_QTC_ARG}) | 131 | set(RUN_QTEST perl ${qpdf_SOURCE_DIR}/run-qtest ${ENABLE_QTC_ARG}) |
| 126 | 132 | ||
| @@ -347,6 +353,7 @@ message(STATUS " build static libraries: ${BUILD_STATIC_LIBS}") | @@ -347,6 +353,7 @@ message(STATUS " build static libraries: ${BUILD_STATIC_LIBS}") | ||
| 347 | message(STATUS " build manual: ${BUILD_DOC}") | 353 | message(STATUS " build manual: ${BUILD_DOC}") |
| 348 | message(STATUS " compiler warnings are errors: ${WERROR}") | 354 | message(STATUS " compiler warnings are errors: ${WERROR}") |
| 349 | message(STATUS " QTC test coverage: ${ENABLE_QTC}") | 355 | message(STATUS " QTC test coverage: ${ENABLE_QTC}") |
| 356 | +message(STATUS " include future changes: ${FUTURE}") | ||
| 350 | message(STATUS " system: ${CPACK_SYSTEM_NAME}") | 357 | message(STATUS " system: ${CPACK_SYSTEM_NAME}") |
| 351 | message(STATUS "") | 358 | message(STATUS "") |
| 352 | message(STATUS "*** Options Summary ***") | 359 | message(STATUS "*** Options Summary ***") |
include/qpdf/QPDFObjectHandle.hh
| @@ -290,6 +290,14 @@ class QPDFObjectHandle | @@ -290,6 +290,14 @@ class QPDFObjectHandle | ||
| 290 | QPDFObjectHandle(QPDFObjectHandle const&) = default; | 290 | QPDFObjectHandle(QPDFObjectHandle const&) = default; |
| 291 | QPDF_DLL | 291 | QPDF_DLL |
| 292 | QPDFObjectHandle& operator=(QPDFObjectHandle const&) = default; | 292 | QPDFObjectHandle& operator=(QPDFObjectHandle const&) = default; |
| 293 | + | ||
| 294 | +#ifdef QPDF_FUTURE | ||
| 295 | + QPDF_DLL | ||
| 296 | + QPDFObjectHandle(QPDFObjectHandle&&) = default; | ||
| 297 | + QPDF_DLL | ||
| 298 | + QPDFObjectHandle& operator=(QPDFObjectHandle&&) = default; | ||
| 299 | +#endif | ||
| 300 | + | ||
| 293 | QPDF_DLL | 301 | QPDF_DLL |
| 294 | inline bool isInitialized() const; | 302 | inline bool isInitialized() const; |
| 295 | 303 |
manual/installation.rst
| @@ -277,6 +277,16 @@ BUILD_SHARED_LIBS, BUILD_STATIC_LIBS | @@ -277,6 +277,16 @@ BUILD_SHARED_LIBS, BUILD_STATIC_LIBS | ||
| 277 | compiled executables can find the DLL. Updating your path is not | 277 | compiled executables can find the DLL. Updating your path is not |
| 278 | necessary if you build with static libraries only. | 278 | necessary if you build with static libraries only. |
| 279 | 279 | ||
| 280 | +FUTURE | ||
| 281 | + This option enables changes planned for the next major release to be | ||
| 282 | + included. They are NOT part of the stable API. These changes are ABI | ||
| 283 | + breaking and are subject to change, which means code linked against | ||
| 284 | + a qpdf built with this option may not be binary compatible with | ||
| 285 | + installed qpdf libraries. Set this if you want to test your code | ||
| 286 | + with proposed QPDF API changes and provide feedback prior to the | ||
| 287 | + inclusion of those changes in a release. Packagers should never | ||
| 288 | + distribute backages built with this option. | ||
| 289 | + | ||
| 280 | QTEST_COLOR | 290 | QTEST_COLOR |
| 281 | Turn this on or off to control whether qtest uses color in its | 291 | Turn this on or off to control whether qtest uses color in its |
| 282 | output. | 292 | output. |
manual/packaging.rst
| @@ -26,6 +26,12 @@ particularly useful to packagers. | @@ -26,6 +26,12 @@ particularly useful to packagers. | ||
| 26 | combined with either ``ctest --verbose`` or ``ctest | 26 | combined with either ``ctest --verbose`` or ``ctest |
| 27 | --output-on-failure``. | 27 | --output-on-failure``. |
| 28 | 28 | ||
| 29 | +- Packagers should never define the ``FUTURE`` build option. API | ||
| 30 | + changes enabled by ``FUTURE`` are not stable and may be | ||
| 31 | + API/ABI-breaking. That option is intended only for people who are | ||
| 32 | + testing their code with a local build of qpdf to provide early | ||
| 33 | + feedback or prepare for possible future changes to the API. | ||
| 34 | + | ||
| 29 | - qpdf's install targets do not install completion files by default | 35 | - qpdf's install targets do not install completion files by default |
| 30 | since there is no standard location for them. As a packager, it's | 36 | since there is no standard location for them. As a packager, it's |
| 31 | good if you install them wherever your distribution expects such | 37 | good if you install them wherever your distribution expects such |
manual/release-notes.rst
| @@ -6,6 +6,10 @@ Release Notes | @@ -6,6 +6,10 @@ Release Notes | ||
| 6 | For a detailed list of changes, please see the file | 6 | For a detailed list of changes, please see the file |
| 7 | :file:`ChangeLog` in the source distribution. | 7 | :file:`ChangeLog` in the source distribution. |
| 8 | 8 | ||
| 9 | +If you are a developer and want to test your code against future API | ||
| 10 | +changes that are under consideration, you can build qpdf locally and | ||
| 11 | +enable the ``FUTURE`` build option (see :ref:`build-options`). | ||
| 12 | + | ||
| 9 | Planned changes for future 12.x (subject to change): | 13 | Planned changes for future 12.x (subject to change): |
| 10 | - ``QPDFObjectHandle`` will support move construction/assignment. | 14 | - ``QPDFObjectHandle`` will support move construction/assignment. |
| 11 | This change will be invisible to most developers but may break | 15 | This change will be invisible to most developers but may break |