mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-14 02:08:27 +08:00
CMakeVerifyManifest: Update documentation
This module could be directly called from the CMake root directory but it is more convenient for projects to wrap it inside a local script and call that script instead. This updates the documentation and syncs with other modules.
This commit is contained in:
@@ -5,31 +5,53 @@
|
|||||||
CMakeVerifyManifest
|
CMakeVerifyManifest
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
Use this script to verify that embedded manifests and side-by-side
|
This module is intended to be used in command-line mode using the
|
||||||
manifests for a project match.
|
:ref:`cmake -P <Script Processing Mode>` to verify that embedded manifests
|
||||||
|
and side-by-side manifests for a project match.
|
||||||
|
|
||||||
This script first recursively globs ``*.manifest`` files from
|
Load this module in a CMake script with:
|
||||||
the current directory and creates a list of allowed version.
|
|
||||||
Additional versions can be passed by setting ``allow_versions``
|
.. code-block:: cmake
|
||||||
from the invocation command.
|
|
||||||
Next, the script globs ``*.exe`` and ``*.dll`` files. Each
|
include(CMakeVerifyManifest)
|
||||||
|
|
||||||
|
This module first recursively globs ``*.manifest`` files from
|
||||||
|
the current source directory and creates a list of allowed versions.
|
||||||
|
|
||||||
|
Next, the script globs all ``*.exe`` and ``*.dll`` files. Each
|
||||||
``.exe`` and ``.dll`` file is scanned for embedded manifests and
|
``.exe`` and ``.dll`` file is scanned for embedded manifests and
|
||||||
the versions of CRT are checked to be in the list of allowed
|
the versions of CRT are checked to be in the list of allowed
|
||||||
version.
|
versions.
|
||||||
|
|
||||||
Example
|
Input Variables
|
||||||
^^^^^^^
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
To run this script, navigate to a directory and run the script
|
This module accepts the following variables:
|
||||||
with ``cmake -P``.
|
|
||||||
|
|
||||||
::
|
``allow_versions``
|
||||||
|
Additional versions can be passed by setting the ``allow_versions``
|
||||||
|
variable from the invocation command. This enables using additional
|
||||||
|
embedded manifest versions in a project, even if that version was not
|
||||||
|
found in a ``.manifest`` file.
|
||||||
|
|
||||||
cmake -Dallow_versions=8.0.50608.0 -PCMakeVerifyManifest.cmake
|
Examples
|
||||||
|
^^^^^^^^
|
||||||
|
|
||||||
This call allows an embedded manifest of 8.0.50608.0 to be used
|
To use this module in the project, create a local command-line script (for
|
||||||
in a project, even if that version was not found in a
|
example, in the project's subdirectory ``cmake/scripts``) and include the
|
||||||
``.manifest`` file.
|
module:
|
||||||
|
|
||||||
|
.. code-block:: cmake
|
||||||
|
:caption: ``cmake/scripts/verify-manifest.cmake``
|
||||||
|
|
||||||
|
include(CMakeVerifyManifest)
|
||||||
|
|
||||||
|
Then run the local script in command-line and, for example, specify
|
||||||
|
additional embedded manifest of ``8.0.50608.0`` to be used in a project:
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
cmake -Dallow_versions=8.0.50608.0 -Pcmake/scripts/verify-manifest.cmake
|
||||||
#]=======================================================================]
|
#]=======================================================================]
|
||||||
|
|
||||||
# crt_version:
|
# crt_version:
|
||||||
|
Reference in New Issue
Block a user