2014-08-03 19:52:23 +02:00
|
|
|
subdirs
|
|
|
|
-------
|
|
|
|
|
2019-11-11 23:01:05 +01:00
|
|
|
.. deprecated:: 3.0
|
|
|
|
|
|
|
|
Use the :command:`add_subdirectory` command instead.
|
2014-08-03 19:52:23 +02:00
|
|
|
|
|
|
|
Add a list of subdirectories to the build.
|
|
|
|
|
2023-05-23 16:38:00 +02:00
|
|
|
.. code-block:: cmake
|
2014-08-03 19:52:23 +02:00
|
|
|
|
|
|
|
subdirs(dir1 dir2 ...[EXCLUDE_FROM_ALL exclude_dir1 exclude_dir2 ...]
|
|
|
|
[PREORDER] )
|
|
|
|
|
2015-11-17 17:22:37 +01:00
|
|
|
Add a list of subdirectories to the build. The :command:`add_subdirectory`
|
|
|
|
command should be used instead of ``subdirs`` although ``subdirs`` will still
|
2014-08-03 19:52:23 +02:00
|
|
|
work. This will cause any CMakeLists.txt files in the sub directories
|
2015-11-17 17:22:37 +01:00
|
|
|
to be processed by CMake. Any directories after the ``PREORDER`` flag are
|
|
|
|
traversed first by makefile builds, the ``PREORDER`` flag has no effect on
|
|
|
|
IDE projects. Any directories after the ``EXCLUDE_FROM_ALL`` marker will
|
2014-08-03 19:52:23 +02:00
|
|
|
not be included in the top level makefile or project file. This is
|
|
|
|
useful for having CMake create makefiles or projects for a set of
|
|
|
|
examples in a project. You would want CMake to generate makefiles or
|
|
|
|
project files for all the examples at the same time, but you would not
|
|
|
|
want them to show up in the top level project or be built each time
|
|
|
|
make is run from the top.
|