Help:custom_command: link policy on BYPRODUCTS

Link policy explaining BYPRODUCTS.

Fixes: #23786
This commit is contained in:
Hinell
2022-09-09 22:40:24 +03:00
committed by Brad King
parent cabba23ab2
commit 00b788e85e
2 changed files with 5 additions and 0 deletions

View File

@@ -67,6 +67,8 @@ The options are:
Each byproduct file will be marked with the :prop_sf:`GENERATED`
source file property automatically.
*See policy* :policy:`CMP0058` *for the motivation behind this feature.*
Explicit specification of byproducts is supported by the
:generator:`Ninja` generator to tell the ``ninja`` build tool
how to regenerate byproducts when they are missing. It is

View File

@@ -71,6 +71,9 @@ every custom command dependency, even on source files, needs to
be treated this way because CMake does not have enough information
to know which files are generated as byproducts of custom commands.
Introducing Byproducts
^^^^^^^^^^^^^^^^^^^^^^
CMake 3.2 introduced the ``BYPRODUCTS`` option to the
:command:`add_custom_command` and :command:`add_custom_target`
commands. This option allows byproducts to be specified explicitly: