summaryrefslogtreecommitdiff
path: root/Modules/AddFileDependencies.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-02-08 12:20:00 -0500
committerBrad King <brad.king@kitware.com>2021-02-08 12:44:37 -0500
commit9cddaad9409506a616be65df43a7abb6d82f3345 (patch)
tree7757d84cb3f73c08b74410b737056a5cf722922a /Modules/AddFileDependencies.cmake
parent4841d38a7a9c48cff7e4edeb900005c04e64398a (diff)
downloadcmake-9cddaad9409506a616be65df43a7abb6d82f3345.tar.gz
AddFileDependencies: Deprecate this unnecessary module
Document that one can call `set_property` directly instead.
Diffstat (limited to 'Modules/AddFileDependencies.cmake')
-rw-r--r--Modules/AddFileDependencies.cmake14
1 files changed, 13 insertions, 1 deletions
diff --git a/Modules/AddFileDependencies.cmake b/Modules/AddFileDependencies.cmake
index c0388582b9..13b2600f9b 100644
--- a/Modules/AddFileDependencies.cmake
+++ b/Modules/AddFileDependencies.cmake
@@ -5,13 +5,25 @@
AddFileDependencies
-------------------
+.. deprecated:: 3.20
+
Add dependencies to a source file.
.. code-block:: cmake
- add_file_dependencies(<source> <files>)
+ add_file_dependencies(<source> <files>...)
Adds the given ``<files>`` to the dependencies of file ``<source>``.
+
+Do not use this command in new code. It is just a wrapper around:
+
+.. code-block:: cmake
+
+ set_property(SOURCE <source> APPEND PROPERTY OBJECT_DEPENDS <files>...)
+
+Instead use the :command:`set_property` command to append to the
+:prop_sf:`OBJECT_DEPENDS` source file property directly.
+
#]=======================================================================]
function(add_file_dependencies _file)