mirror of
https://github.com/reactos/CMake.git
synced 2025-01-31 08:52:21 +00:00
Help: Expand discussion of GENERATED / BYPRODUCTS
- Mention the Makefile Generators' `make clean` removal in the BYPRODUCTS section of add_custom_command and add_custom_target - Expand the GENERATED property docs' description of which files will be marked with the property, and of what it implies (including `make clean` removal)
This commit is contained in:
parent
1853c7f571
commit
3eb2b62d21
@ -68,6 +68,9 @@ The options are:
|
||||
order-only dependencies to ensure the byproducts will be
|
||||
available before their dependents build.
|
||||
|
||||
The :ref:`Makefile Generators` will remove ``BYPRODUCTS`` and other
|
||||
:prop_sf:`GENERATED` files during ``make clean``.
|
||||
|
||||
``COMMAND``
|
||||
Specify the command-line(s) to execute at build time.
|
||||
If more than one ``COMMAND`` is specified they will be executed in order,
|
||||
|
@ -49,6 +49,9 @@ The options are:
|
||||
order-only dependencies to ensure the byproducts will be
|
||||
available before their dependents build.
|
||||
|
||||
The :ref:`Makefile Generators` will remove ``BYPRODUCTS`` and other
|
||||
:prop_sf:`GENERATED` files during ``make clean``.
|
||||
|
||||
``COMMAND``
|
||||
Specify the command-line(s) to execute at build time.
|
||||
If more than one ``COMMAND`` is specified they will be executed in order,
|
||||
|
@ -4,16 +4,29 @@ GENERATED
|
||||
Is this source file generated as part of the build or CMake process.
|
||||
|
||||
Tells the internal CMake engine that a source file is generated by an outside
|
||||
process such as another build step, or the execution of CMake itself. This
|
||||
information is then used to exempt the file from any existence or validity
|
||||
checks. Generated files are created by the execution of commands such as
|
||||
:command:`add_custom_command` and :command:`file(GENERATE)`.
|
||||
process such as another build step, or the execution of CMake itself.
|
||||
This information is then used to exempt the file from any existence or
|
||||
validity checks.
|
||||
|
||||
When a generated file created by an :command:`add_custom_command` command
|
||||
is explicitly listed as a source file for any target in the same
|
||||
directory scope (which usually means the same ``CMakeLists.txt`` file),
|
||||
CMake will automatically create a dependency to make sure the file is
|
||||
generated before building that target.
|
||||
Any file that is
|
||||
|
||||
- created by the execution of commands such as
|
||||
:command:`add_custom_command` and :command:`file(GENERATE)`
|
||||
- listed as one of the ``BYPRODUCTS`` of an :command:`add_custom_command`
|
||||
or :command:`add_custom_target` command, or
|
||||
- created by a CMake ``AUTOGEN`` operation such as :prop_tgt:`AUTOMOC`,
|
||||
:prop_tgt:`AUTORCC`, or :prop_tgt:`AUTOUIC`
|
||||
|
||||
will be marked with the ``GENERATED`` property.
|
||||
|
||||
When a generated file created as the ``OUTPUT`` of an
|
||||
:command:`add_custom_command` command is explicitly listed as a source file
|
||||
for any target in the same directory scope (which usually means the same
|
||||
``CMakeLists.txt`` file), CMake will automatically create a dependency to
|
||||
make sure the file is generated before building that target.
|
||||
|
||||
The :ref:`Makefile Generators` will remove ``GENERATED`` files during
|
||||
``make clean``.
|
||||
|
||||
Generated sources may be hidden in some IDE tools, while in others they might
|
||||
be shown. For the special case of sources generated by CMake's :prop_tgt:`AUTOMOC`
|
||||
|
Loading…
x
Reference in New Issue
Block a user