summaryrefslogtreecommitdiffstats
path: root/Help/command/add_custom_command.rst
diff options
context:
space:
mode:
authorKulla Christoph <christoph.kulla@de.bosch.com>2016-08-05 12:39:31 (GMT)
committerBrad King <brad.king@kitware.com>2016-08-30 13:05:18 (GMT)
commit048d1adb4ede50e49dce00873a5961e424e149f9 (patch)
tree2f7ec3c0e5a773820c8cd74efa90c12124bbcce3 /Help/command/add_custom_command.rst
parent98caa14cc84cc659c2c5b51f84c6547b57c89c30 (diff)
downloadCMake-048d1adb4ede50e49dce00873a5961e424e149f9.zip
CMake-048d1adb4ede50e49dce00873a5961e424e149f9.tar.gz
CMake-048d1adb4ede50e49dce00873a5961e424e149f9.tar.bz2
add_custom_command: Add DEPFILE option for Ninja
Provide a way for custom commands to inform the ninja build tool about their implicit dependencies. For now simply make use of the option an error on other generators. Closes: #15479
Diffstat (limited to 'Help/command/add_custom_command.rst')
-rw-r--r--Help/command/add_custom_command.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/Help/command/add_custom_command.rst b/Help/command/add_custom_command.rst
index d421364..4ab4298 100644
--- a/Help/command/add_custom_command.rst
+++ b/Help/command/add_custom_command.rst
@@ -20,6 +20,7 @@ The first signature is for adding a custom command to produce an output::
[<lang2> depend2] ...]
[WORKING_DIRECTORY dir]
[COMMENT comment]
+ [DEPFILE depfile]
[VERBATIM] [APPEND] [USES_TERMINAL])
This defines a command to generate specified ``OUTPUT`` file(s).
@@ -170,6 +171,12 @@ The options are:
If it is a relative path it will be interpreted relative to the
build tree directory corresponding to the current source directory.
+``DEPFILE``
+ Specify a ``.d`` depfile for the :generator:`Ninja` generator.
+ A ``.d`` file holds dependencies usually emitted by the custom
+ command itself.
+ Using ``DEPFILE`` with other generators than Ninja is an error.
+
Build Events
^^^^^^^^^^^^