- integrations
- CMake
- ocx_self_update
ocx_self_update
Replaces the vendored ocx.cmake and a sibling Findocx.cmake with a released find_ocx version.
ocx_self_update()New in version 0.4.
The command runs in script mode only (cmake -P). A configure fails with an error, because the command rewrites files in the source tree. cmake -P ocx.cmake calls it, and so does a call after include(ocx) from your own script.
OCX_SELF_UPDATE_VERSION names the release. The default is the latest release, found through the GitHub releases API. The files come from GitHub or from OCX_SELF_UPDATE_URL.
The release SHA256SUMS file is the trust root. The command downloads both files and verifies them against it before either one replaces the vendored copy. A failed update leaves the vendored copy untouched.
Example
Section titled “Example”The check tests/self_update_check.cmake runs this form against a file:// release.
cmake -DOCX_SELF_UPDATE_VERSION=v0.4.0 -P cmake/ocx.cmakeAll commands are listed in the command reference.