EXCLUDE_FROM_ALL.rst 1.6 KB

12345678910111213141516171819202122232425262728293031323334
  1. EXCLUDE_FROM_ALL
  2. ----------------
  3. Set this directory property to a true value on a subdirectory to exclude
  4. its targets from the "all" target of its ancestors. If excluded, running
  5. e.g. ``make`` in the parent directory will not build targets in the
  6. subdirectory by default. This does not affect the "all" target of the
  7. subdirectory itself. Running e.g. ``make`` inside the subdirectory will
  8. still build its targets.
  9. ``EXCLUDE_FROM_ALL`` is meant for when the subdirectory contains
  10. a separate part of the project that is useful, but not necessary,
  11. such as a set of examples, or e.g. an integrated 3rd party library.
  12. Typically the subdirectory should contain its own :command:`project`
  13. command invocation so that a full build system will be generated in the
  14. subdirectory (such as a Visual Studio IDE solution file). Note that
  15. inter-target dependencies supersede this exclusion. If a target built by
  16. the parent project depends on a target in the subdirectory, the dependee
  17. target will be included in the parent project build system to satisfy
  18. the dependency.
  19. If the ``EXCLUDE_FROM_ALL`` argument is provided, it has the following effects:
  20. * Targets defined in the subdirectory or below will not be
  21. included in the ``ALL`` target of the parent directory.
  22. Those targets must be built explicitly by the user,
  23. or be a dependency of another target that will be built.
  24. * Targets defined in the subdirectory or below will be
  25. excluded from IDE project files.
  26. * Any install rules defined in the subdirectory or below will
  27. be ignored when installing the parent directory.
  28. Note that these effects are not the same as those for the
  29. :prop_tgt:`EXCLUDE_FROM_ALL` target property.