diff options
author | Brad King <brad.king@kitware.com> | 2021-02-08 12:20:00 -0500 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-02-08 12:44:37 -0500 |
commit | 9cddaad9409506a616be65df43a7abb6d82f3345 (patch) | |
tree | 7757d84cb3f73c08b74410b737056a5cf722922a | |
parent | 4841d38a7a9c48cff7e4edeb900005c04e64398a (diff) | |
download | cmake-9cddaad9409506a616be65df43a7abb6d82f3345.tar.gz |
AddFileDependencies: Deprecate this unnecessary module
Document that one can call `set_property` directly instead.
-rw-r--r-- | Help/manual/cmake-modules.7.rst | 2 | ||||
-rw-r--r-- | Help/release/dev/AddFileDependencies-deprecate.rst | 5 | ||||
-rw-r--r-- | Modules/AddFileDependencies.cmake | 14 |
3 files changed, 19 insertions, 2 deletions
diff --git a/Help/manual/cmake-modules.7.rst b/Help/manual/cmake-modules.7.rst index e108bc34b9..17c1a1e5c3 100644 --- a/Help/manual/cmake-modules.7.rst +++ b/Help/manual/cmake-modules.7.rst @@ -15,7 +15,6 @@ These modules are loaded using the :command:`include` command. .. toctree:: :maxdepth: 1 - /module/AddFileDependencies /module/AndroidTestUtilities /module/BundleUtilities /module/CheckCCompilerFlag @@ -272,6 +271,7 @@ Deprecated Utility Modules .. toctree:: :maxdepth: 1 + /module/AddFileDependencies /module/CMakeDetermineVSServicePack /module/CMakeExpandImportedTargets /module/CMakeForceCompiler diff --git a/Help/release/dev/AddFileDependencies-deprecate.rst b/Help/release/dev/AddFileDependencies-deprecate.rst new file mode 100644 index 0000000000..d3946a5d1c --- /dev/null +++ b/Help/release/dev/AddFileDependencies-deprecate.rst @@ -0,0 +1,5 @@ +AddFileDependencies-deprecate +----------------------------- + +* The :module:`AddFileDependencies` module is deprecated. + Port projects to use :command:`set_property` directly. 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) |