add_dependencies.rst 686 B

12345678910111213141516171819
  1. add_dependencies
  2. ----------------
  3. Add a dependency between top-level targets.
  4. ::
  5. add_dependencies(<target> [<target-dependency>]...)
  6. Make a top-level <target> depend on other top-level targets to ensure
  7. that they build before <target> does. A top-level target is one
  8. created by ADD_EXECUTABLE, ADD_LIBRARY, or ADD_CUSTOM_TARGET.
  9. Dependencies added to an IMPORTED target are followed transitively in
  10. its place since the target itself does not build.
  11. See the DEPENDS option of ADD_CUSTOM_TARGET and ADD_CUSTOM_COMMAND for
  12. adding file-level dependencies in custom rules. See the
  13. OBJECT_DEPENDS option in SET_SOURCE_FILES_PROPERTIES to add file-level
  14. dependencies to object files.