summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorPeter Würth <wuerth.peter@freenet.de>2022-11-18 11:29:47 (GMT)
committerPeter Würth <wuerth.peter@freenet.de>2022-11-19 12:32:56 (GMT)
commit26d813092bffdcda77976ab5ba59c114e3e2fda5 (patch)
tree13704e2e7a4ca069d7ff331fece81150929bd580 /Help
parent60a5a39022c8c2504173d635732110b2550b7f91 (diff)
downloadCMake-26d813092bffdcda77976ab5ba59c114e3e2fda5.zip
CMake-26d813092bffdcda77976ab5ba59c114e3e2fda5.tar.gz
CMake-26d813092bffdcda77976ab5ba59c114e3e2fda5.tar.bz2
add_custom_{command,target}: add genex support for COMMENT
Evaluate and expand generator expressions in the `COMMENT` argument of the `add_custom_command()` and `add_custom_target()` commands. This allows to include generator expressions, e.g. a targets location $<TARGET_...> or the current configuration $<CONFIG>, in the build-time messages. Fixes #22507
Diffstat (limited to 'Help')
-rw-r--r--Help/command/add_custom_command.rst4
-rw-r--r--Help/command/add_custom_target.rst4
-rw-r--r--Help/release/dev/custom-command-comment-genex.rst6
3 files changed, 14 insertions, 0 deletions
diff --git a/Help/command/add_custom_command.rst b/Help/command/add_custom_command.rst
index a999c2d..5878997 100644
--- a/Help/command/add_custom_command.rst
+++ b/Help/command/add_custom_command.rst
@@ -140,6 +140,10 @@ The options are:
Display the given message before the commands are executed at
build time.
+ .. versionadded:: 3.26
+ Arguments to ``COMMENT`` may use
+ :manual:`generator expressions <cmake-generator-expressions(7)>`.
+
``DEPENDS``
Specify files on which the command depends. Each argument is converted
to a dependency as follows:
diff --git a/Help/command/add_custom_target.rst b/Help/command/add_custom_target.rst
index ec02ee2..545b9a5 100644
--- a/Help/command/add_custom_target.rst
+++ b/Help/command/add_custom_target.rst
@@ -109,6 +109,10 @@ The options are:
Display the given message before the commands are executed at
build time.
+ .. versionadded:: 3.26
+ Arguments to ``COMMENT`` may use
+ :manual:`generator expressions <cmake-generator-expressions(7)>`.
+
``DEPENDS``
Reference files and outputs of custom commands created with
:command:`add_custom_command` command calls in the same directory
diff --git a/Help/release/dev/custom-command-comment-genex.rst b/Help/release/dev/custom-command-comment-genex.rst
new file mode 100644
index 0000000..f9402f2
--- /dev/null
+++ b/Help/release/dev/custom-command-comment-genex.rst
@@ -0,0 +1,6 @@
+custom-command-comment-genex
+----------------------------
+
+* :command:`add_custom_command` and :command:`add_custom_target` now
+ support :manual:`generator expressions <cmake-generator-expressions(7)>`
+ in their ``COMMENT`` option.