Bladeren bron

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.
Brad King 10 jaren geleden
bovenliggende
commit
0e708d17e9
1 gewijzigde bestanden met toevoegingen van 3 en 0 verwijderingen
  1. 3 0
      Help/command/add_custom_command.rst

+ 3 - 0
Help/command/add_custom_command.rst

@@ -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