add_custom_command: convert DEPENDS path arguments to absolute paths

This is only done if they are "obviously" paths in that they contain a
directory separator.

Fixes: #17111
This commit is contained in:
Ben Boeckel
2019-12-18 09:48:40 -05:00
parent a5f44ec925
commit f5126badd8
4 changed files with 32 additions and 3 deletions
+5 -3
View File
@@ -112,9 +112,11 @@ The options are:
build time.
``DEPENDS``
Specify files on which the command depends. If any dependency is
an ``OUTPUT`` of another custom command in the same directory
(``CMakeLists.txt`` file) CMake automatically brings the other
Specify files on which the command depends. Entries in the ``DEPENDS``
argument list which may also be target names are assumed to be target names,
so only entries which contain a path separator are detected as file paths.
If any dependency is an ``OUTPUT`` of another custom command in the same
directory (``CMakeLists.txt`` file) CMake automatically brings the other
custom command into the target in which this command is built.
A target-level dependency is added if any dependency is listed as
``BYPRODUCTS`` of a target or any of its build events in the same