cmake/Help/generator/Ninja.rst

68 lines
1.5 KiB
ReStructuredText
Raw Normal View History

2014-08-03 19:52:23 +02:00
Ninja
-----
2020-08-30 11:54:41 +02:00
Generates ``build.ninja`` files.
2014-08-03 19:52:23 +02:00
2020-02-01 23:06:01 +01:00
A ``build.ninja`` file is generated into the build tree. Use the ninja
program to build the project through the ``all`` target and install the
project through the ``install`` (or ``install/strip``) target.
2016-07-09 11:21:54 +02:00
2016-10-30 18:24:19 +01:00
For each subdirectory ``sub/dir`` of the project, additional targets
are generated:
``sub/dir/all``
2021-09-14 00:13:48 +02:00
.. versionadded:: 3.6
Depends on all targets required by the subdirectory.
2016-10-30 18:24:19 +01:00
``sub/dir/install``
2021-09-14 00:13:48 +02:00
.. versionadded:: 3.7
Runs the install step in the subdirectory, if any.
2016-10-30 18:24:19 +01:00
2020-02-01 23:06:01 +01:00
``sub/dir/install/strip``
2021-09-14 00:13:48 +02:00
.. versionadded:: 3.7
Runs the install step in the subdirectory followed by a ``CMAKE_STRIP`` command,
if any.
The ``CMAKE_STRIP`` variable will contain the platform's ``strip`` utility, which
removes symbols information from generated binaries.
2020-02-01 23:06:01 +01:00
2016-10-30 18:24:19 +01:00
``sub/dir/test``
2021-09-14 00:13:48 +02:00
.. versionadded:: 3.7
Runs the test step in the subdirectory, if any.
2016-10-30 18:24:19 +01:00
``sub/dir/package``
2021-09-14 00:13:48 +02:00
.. versionadded:: 3.7
Runs the package step in the subdirectory, if any.
2016-10-30 18:24:19 +01:00
Fortran Support
^^^^^^^^^^^^^^^
2021-09-14 00:13:48 +02:00
.. versionadded:: 3.7
2016-10-30 18:24:19 +01:00
The ``Ninja`` generator conditionally supports Fortran when the ``ninja``
2020-08-30 11:54:41 +02:00
tool is at least version 1.10 (which has the required features).
2016-10-30 18:24:19 +01:00
2021-09-14 00:13:48 +02:00
Swift Support
^^^^^^^^^^^^^
.. versionadded:: 3.15
The Swift support is experimental, not considered stable, and may change
in future releases of CMake.
2020-08-30 11:54:41 +02:00
See Also
^^^^^^^^
2021-09-14 00:13:48 +02:00
.. versionadded:: 3.17
The :generator:`Ninja Multi-Config` generator is similar to the ``Ninja``
generator, but generates multiple configurations at once.