OBJECT_DEPENDS.rst 1.1 KB

123456789101112131415161718192021
  1. OBJECT_DEPENDS
  2. --------------
  3. Additional files on which a compiled object file depends.
  4. Specifies a :ref:`;-list <CMake Language Lists>` of full-paths to
  5. files on which any object files compiled from this source file depend.
  6. On :ref:`Makefile Generators` and the :generator:`Ninja` generator an
  7. object file will be recompiled if any of the named files is newer than it.
  8. :ref:`Visual Studio Generators` and the :generator:`Xcode` generator
  9. cannot implement such compilation dependencies.
  10. This property need not be used to specify the dependency of a source
  11. file on a generated header file that it includes. Although the
  12. property was originally introduced for this purpose, it is no longer
  13. necessary. If the generated header file is created by a custom
  14. command in the same target as the source file, the automatic
  15. dependency scanning process will recognize the dependency. If the
  16. generated header file is created by another target, an inter-target
  17. dependency should be created with the :command:`add_dependencies`
  18. command (if one does not already exist due to linking relationships).