mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
install: Implement new install(CODE|SCRIPT) option ALL_COMPONENTS
In a per-component installation the generated installation scripts are invoked once for each component. Per default custom installation script code added by install(CODE|SCRIPT) only runs for one specific component in this context. The new ALL_COMPONENTS option allows custom script code to be run once for each component being installed.
This commit is contained in:
@@ -619,7 +619,7 @@ Custom Installation Logic
|
||||
.. code-block:: cmake
|
||||
|
||||
install([[SCRIPT <file>] [CODE <code>]]
|
||||
[COMPONENT <component>] [EXCLUDE_FROM_ALL] [...])
|
||||
[COMPONENT <component>] [EXCLUDE_FROM_ALL] [ALL_COMPONENTS] [...])
|
||||
|
||||
The ``SCRIPT`` form will invoke the given CMake script files during
|
||||
installation. If the script file name is a relative path it will be
|
||||
@@ -634,6 +634,12 @@ example, the code
|
||||
|
||||
will print a message during installation.
|
||||
|
||||
The option ``ALL_COMPONENTS``
|
||||
.. versionadded:: 3.21
|
||||
|
||||
Run the custom installation script code for every component of a
|
||||
component-specific installation.
|
||||
|
||||
.. versionadded:: 3.14
|
||||
``<file>`` or ``<code>`` may use "generator expressions" with the syntax
|
||||
``$<...>`` (in the case of ``<file>``, this refers to their use in the file
|
||||
|
||||
Reference in New Issue
Block a user