Help: Reference TARGET_FILE genex in add_custom_command docs (#15605)

When documenting in the COMMAND option how to reference an executable,
we previously only explicitly covered how to do it for argv[0] and left
it to the reader to follow the reference to the generator expressions
manual.  Add explicit mention of the TARGET_FILE genex in this
documentation since it will be a commonly used generator expression in
this context.
This commit is contained in:
Brad King 2015-06-08 09:04:23 -04:00
parent a6916a6c6e
commit 0e708d17e9
1 changed files with 3 additions and 0 deletions

View File

@ -79,6 +79,9 @@ The options are:
If ``COMMAND`` specifies an executable target (created by the
:command:`add_executable` command) it will automatically be replaced
by the location of the executable created at build time.
(Use the ``TARGET_FILE``
:manual:`generator expression <cmake-generator-expressions(7)>` to
reference an executable later in the command line.)
Additionally a target-level dependency will be added so that the
executable target will be built before any target using this custom
command. However this does NOT add a file-level dependency that