MacroAddFileDependencies.cmake 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. # file LICENSE.rst or https://cmake.org/licensing for details.
  3. #[=======================================================================[.rst:
  4. MacroAddFileDependencies
  5. ------------------------
  6. .. deprecated:: 3.14
  7. Do not use this module in new code.
  8. Instead use the :command:`set_property` command to append to the
  9. :prop_sf:`OBJECT_DEPENDS` source file property directly:
  10. .. code-block:: cmake
  11. set_property(SOURCE <source> APPEND PROPERTY OBJECT_DEPENDS <files>...)
  12. Load this module in a CMake project with:
  13. .. code-block:: cmake
  14. include(MacroAddFileDependencies)
  15. Commands
  16. ^^^^^^^^
  17. This module provides the following command:
  18. .. command:: macro_add_file_dependencies
  19. Adds dependencies to a source file:
  20. .. code-block:: cmake
  21. macro_add_file_dependencies(<source> <files>...)
  22. This command adds the given ``<files>`` to the dependencies of file
  23. ``<source>``.
  24. #]=======================================================================]
  25. macro(MACRO_ADD_FILE_DEPENDENCIES _file)
  26. set_property(SOURCE "${_file}" APPEND PROPERTY OBJECT_DEPENDS "${ARGN}")
  27. endmacro()