.. _add_subdirectory:

add_subdirectory
================

.. cmake_function:: add_subdirectory

   .. cmake_param:: dir
      :single:
      :positional:
      :required:

      The :code:`CMakeLists.txt` file from this subdirectory
      will be executed next.

   .. cmake_param:: EXCLUDE_FROM_ALL
      :option:

      Whether targets added in this subdirectory should be built
      during :code:`make all`.

   This is a cmake builtin command.
   For detailed information, check the cmake documentation:

   ::

      cmake --help-command add_subdirectory

