summaryrefslogtreecommitdiffstats
path: root/Help/command
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2023-05-19 02:40:36 (GMT)
committerCraig Scott <craig.scott@crascit.com>2023-05-19 02:40:36 (GMT)
commit949dcdb3bcc8f3c1084dc933240dbe3546941dad (patch)
tree6a7ab2d87b483175a84535d50a87a362aa4a0daa /Help/command
parent5056a224dc4c74912f0ca2c1af1bf69bab88a5be (diff)
downloadCMake-949dcdb3bcc8f3c1084dc933240dbe3546941dad.zip
CMake-949dcdb3bcc8f3c1084dc933240dbe3546941dad.tar.gz
CMake-949dcdb3bcc8f3c1084dc933240dbe3546941dad.tar.bz2
Help: Clarify PRE_BUILD option for add_custom_command()
Fixes: #24889
Diffstat (limited to 'Help/command')
-rw-r--r--Help/command/add_custom_command.rst9
1 files changed, 6 insertions, 3 deletions
diff --git a/Help/command/add_custom_command.rst b/Help/command/add_custom_command.rst
index 1ccd434..7b3aa1a 100644
--- a/Help/command/add_custom_command.rst
+++ b/Help/command/add_custom_command.rst
@@ -489,9 +489,12 @@ When the command will happen is determined by which
of the following is specified:
``PRE_BUILD``
- On :ref:`Visual Studio Generators`, run before any other rules are
- executed within the target.
- On other generators, run just before ``PRE_LINK`` commands.
+ This option has unique behavior for the :ref:`Visual Studio Generators`.
+ When using one of the Visual Studio generators, the command will run before
+ any other rules are executed within the target. With all other generators,
+ this option behaves the same as ``PRE_LINK`` instead. Because of this,
+ it is recommended to avoid using ``PRE_BUILD`` except when it is known that
+ a Visual Studio generator is being used.
``PRE_LINK``
Run after sources have been compiled but before linking the binary
or running the librarian or archiver tool of a static library.