summaryrefslogtreecommitdiffstats
path: root/Help/command
diff options
context:
space:
mode:
authorBartosz Kosiorek <gang65@poczta.onet.pl>2016-01-28 09:52:15 (GMT)
committerBrad King <brad.king@kitware.com>2016-01-28 15:13:27 (GMT)
commit4d53e0a75e3ccddf14f556e88302573f14aa8830 (patch)
tree00c606355ec87050bd5dcc53895c3d770e551506 /Help/command
parent8c615af4dfaaec38dfb7f42ec951485644c2e24b (diff)
downloadCMake-4d53e0a75e3ccddf14f556e88302573f14aa8830.zip
CMake-4d53e0a75e3ccddf14f556e88302573f14aa8830.tar.gz
CMake-4d53e0a75e3ccddf14f556e88302573f14aa8830.tar.bz2
Help: Clarify `add_custom_command(TARGET)` scope (#15681)
Diffstat (limited to 'Help/command')
-rw-r--r--Help/command/add_custom_command.rst7
1 files changed, 5 insertions, 2 deletions
diff --git a/Help/command/add_custom_command.rst b/Help/command/add_custom_command.rst
index ecbf9dd..8726b70 100644
--- a/Help/command/add_custom_command.rst
+++ b/Help/command/add_custom_command.rst
@@ -178,7 +178,7 @@ target is already built, the command will not execute.
::
- add_custom_command(TARGET target
+ add_custom_command(TARGET <target>
PRE_BUILD | PRE_LINK | POST_BUILD
COMMAND command1 [ARGS] [args1...]
[COMMAND command2 [ARGS] [args2...] ...]
@@ -188,7 +188,10 @@ target is already built, the command will not execute.
[VERBATIM] [USES_TERMINAL])
This defines a new command that will be associated with building the
-specified target. When the command will happen is determined by which
+specified ``<target>``. The ``<target>`` must be defined in the current
+directory; targets defined in other directories may not be specified.
+
+When the command will happen is determined by which
of the following is specified:
``PRE_BUILD``