1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-22 16:07:49 +08:00

Help: Add .. versionadded directives to generator docs

More `.. versionadded` could be added later when the features,
variables and properties relevant to each generator are properly
documented.

Issue: #19715
This commit is contained in:
Nikita Nemkin
2020-11-11 02:48:05 +05:00
parent f6fd769ae9
commit c43e845d09
13 changed files with 151 additions and 78 deletions

View File

@@ -7,13 +7,15 @@ Project files for CodeBlocks will be created in the top directory and
in every subdirectory which features a ``CMakeLists.txt`` file containing in every subdirectory which features a ``CMakeLists.txt`` file containing
a :command:`project` call. Additionally a hierarchy of makefiles is generated a :command:`project` call. Additionally a hierarchy of makefiles is generated
into the build tree. into the build tree.
The :variable:`CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES` variable may
be set to ``ON`` to exclude any files which are located outside of
the project root directory.
The appropriate make program can build the The appropriate make program can build the
project through the default ``all`` target. An ``install`` target is project through the default ``all`` target. An ``install`` target is
also provided. also provided.
.. versionadded:: 3.10
The :variable:`CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES` variable may
be set to ``ON`` to exclude any files which are located outside of
the project root directory.
This "extra" generator may be specified as: This "extra" generator may be specified as:
``CodeBlocks - MinGW Makefiles`` ``CodeBlocks - MinGW Makefiles``
@@ -23,6 +25,7 @@ This "extra" generator may be specified as:
Generate with :generator:`NMake Makefiles`. Generate with :generator:`NMake Makefiles`.
``CodeBlocks - NMake Makefiles JOM`` ``CodeBlocks - NMake Makefiles JOM``
.. versionadded:: 3.8
Generate with :generator:`NMake Makefiles JOM`. Generate with :generator:`NMake Makefiles JOM`.
``CodeBlocks - Ninja`` ``CodeBlocks - Ninja``

View File

@@ -6,13 +6,15 @@ Generates CodeLite project files.
Project files for CodeLite will be created in the top directory and Project files for CodeLite will be created in the top directory and
in every subdirectory which features a CMakeLists.txt file containing in every subdirectory which features a CMakeLists.txt file containing
a :command:`project` call. a :command:`project` call.
The :variable:`CMAKE_CODELITE_USE_TARGETS` variable may be set to ``ON``
to change the default behavior from projects to targets as the basis
for project files.
The appropriate make program can build the The appropriate make program can build the
project through the default ``all`` target. An ``install`` target project through the default ``all`` target. An ``install`` target
is also provided. is also provided.
.. versionadded:: 3.7
The :variable:`CMAKE_CODELITE_USE_TARGETS` variable may be set to ``ON``
to change the default behavior from projects to targets as the basis
for project files.
This "extra" generator may be specified as: This "extra" generator may be specified as:
``CodeLite - MinGW Makefiles`` ``CodeLite - MinGW Makefiles``

View File

@@ -3,22 +3,36 @@ Green Hills MULTI
.. versionadded:: 3.3 .. versionadded:: 3.3
.. versionadded:: 3.15
Linux support.
Generates Green Hills MULTI project files (experimental, work-in-progress). Generates Green Hills MULTI project files (experimental, work-in-progress).
The buildsystem has predetermined build-configuration settings that can be controlled Customizations are available through the following cache variables:
via the :variable:`CMAKE_BUILD_TYPE` variable.
* ``GHS_CUSTOMIZATION``
* ``GHS_GPJ_MACROS``
.. versionadded:: 3.14
The buildsystem has predetermined build-configuration settings that can be controlled
via the :variable:`CMAKE_BUILD_TYPE` variable.
Toolset and Platform Selection
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. versionadded:: 3.13
Customizations that are used to pick toolset and target system: Customizations that are used to pick toolset and target system:
The ``-A <arch>`` can be supplied for setting the target architecture. * The ``-A <arch>`` can be supplied for setting the target architecture.
``<arch>`` usually is one of ``arm``, ``ppc``, ``86``, etcetera. ``<arch>`` usually is one of ``arm``, ``ppc``, ``86``, etcetera.
If the target architecture is not specified then If the target architecture is not specified then
the default architecture of ``arm`` will be used. the default architecture of ``arm`` will be used.
The ``-T <toolset>`` option can be used to set the directory location of the toolset. * The ``-T <toolset>`` option can be used to set the directory location of the toolset.
Both absolute and relative paths are valid. Relative paths use ``GHS_TOOLSET_ROOT`` Both absolute and relative paths are valid. Relative paths use ``GHS_TOOLSET_ROOT``
as the root. If the toolset is not specified then the latest toolset found in as the root. If the toolset is not specified then the latest toolset found in
``GHS_TOOLSET_ROOT`` will be used. ``GHS_TOOLSET_ROOT`` will be used.
Cache variables that are used for toolset and target system customization: Cache variables that are used for toolset and target system customization:
@@ -50,15 +64,18 @@ Cache variables that are used for toolset and target system customization:
a specific RTOS is to be used. a specific RTOS is to be used.
| ``GHS_OS_DIR_OPTION`` default value is ``-os_dir``. | ``GHS_OS_DIR_OPTION`` default value is ``-os_dir``.
.. versionadded:: 3.15
``GHS_OS_DIR_OPTION`` variable.
* ``GHS_BSP_NAME`` * ``GHS_BSP_NAME``
| Sets ``-bsp`` entry in project file. | Sets ``-bsp`` entry in project file.
| Defaults to ``sim<arch>`` for ``integrity`` platforms. | Defaults to ``sim<arch>`` for ``integrity`` platforms.
Customizations are available through the following cache variables: Target Properties
^^^^^^^^^^^^^^^^^
* ``GHS_CUSTOMIZATION`` .. versionadded:: 3.14
* ``GHS_GPJ_MACROS``
The following properties are available: The following properties are available:

View File

@@ -2,3 +2,6 @@ NMake Makefiles JOM
------------------- -------------------
Generates JOM makefiles. Generates JOM makefiles.
.. versionadded:: 3.8
:generator:`CodeBlocks` generator can be used as an extra generator.

View File

@@ -11,12 +11,20 @@ For each subdirectory ``sub/dir`` of the project, additional targets
are generated: are generated:
``sub/dir/all`` ``sub/dir/all``
.. versionadded:: 3.6
Depends on all targets required by the subdirectory. Depends on all targets required by the subdirectory.
``sub/dir/install`` ``sub/dir/install``
.. versionadded:: 3.7
Runs the install step in the subdirectory, if any. Runs the install step in the subdirectory, if any.
``sub/dir/install/strip`` ``sub/dir/install/strip``
.. versionadded:: 3.7
Runs the install step in the subdirectory followed by a ``CMAKE_STRIP`` command, Runs the install step in the subdirectory followed by a ``CMAKE_STRIP`` command,
if any. if any.
@@ -24,19 +32,36 @@ are generated:
removes symbols information from generated binaries. removes symbols information from generated binaries.
``sub/dir/test`` ``sub/dir/test``
.. versionadded:: 3.7
Runs the test step in the subdirectory, if any. Runs the test step in the subdirectory, if any.
``sub/dir/package`` ``sub/dir/package``
.. versionadded:: 3.7
Runs the package step in the subdirectory, if any. Runs the package step in the subdirectory, if any.
Fortran Support Fortran Support
^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^
.. versionadded:: 3.7
The ``Ninja`` generator conditionally supports Fortran when the ``ninja`` The ``Ninja`` generator conditionally supports Fortran when the ``ninja``
tool is at least version 1.10 (which has the required features). tool is at least version 1.10 (which has the required features).
Swift Support
^^^^^^^^^^^^^
.. versionadded:: 3.15
The Swift support is experimental, not considered stable, and may change
in future releases of CMake.
See Also See Also
^^^^^^^^ ^^^^^^^^
The :generator:`Ninja Multi-Config` generator is similar to the ``Ninja`` .. versionadded:: 3.17
generator, but generates multiple configurations at once. The :generator:`Ninja Multi-Config` generator is similar to the ``Ninja``
generator, but generates multiple configurations at once.

View File

@@ -1,7 +1,11 @@
For each toolset that comes with this version of Visual Studio, there are .. versionadded:: 3.8
variants that are themselves compiled for 32-bit (``x86``) and For each toolset that comes with this version of Visual Studio, there are
64-bit (``x64``) hosts (independent of the architecture they target). variants that are themselves compiled for 32-bit (``x86``) and
|VS_TOOLSET_HOST_ARCH_DEFAULT| 64-bit (``x64``) hosts (independent of the architecture they target).
One may explicitly request use of either the 32-bit or 64-bit host tools |VS_TOOLSET_HOST_ARCH_DEFAULT|
by adding either ``host=x86`` or ``host=x64`` to the toolset specification. One may explicitly request use of either the 32-bit or 64-bit host tools
See the :variable:`CMAKE_GENERATOR_TOOLSET` variable for details. by adding either ``host=x86`` or ``host=x64`` to the toolset specification.
See the :variable:`CMAKE_GENERATOR_TOOLSET` variable for details.
.. versionadded:: 3.14
Added suport for ``host=x86`` option.

View File

@@ -17,13 +17,14 @@ Platform Selection
The default target platform name (architecture) is ``Win32``. The default target platform name (architecture) is ``Win32``.
The :variable:`CMAKE_GENERATOR_PLATFORM` variable may be set, perhaps .. versionadded:: 3.1
via the :manual:`cmake(1)` ``-A`` option, to specify a target platform The :variable:`CMAKE_GENERATOR_PLATFORM` variable may be set, perhaps
name (architecture). For example: via the :manual:`cmake(1)` ``-A`` option, to specify a target platform
name (architecture). For example:
* ``cmake -G "Visual Studio 10 2010" -A Win32`` * ``cmake -G "Visual Studio 10 2010" -A Win32``
* ``cmake -G "Visual Studio 10 2010" -A x64`` * ``cmake -G "Visual Studio 10 2010" -A x64``
* ``cmake -G "Visual Studio 10 2010" -A Itanium`` * ``cmake -G "Visual Studio 10 2010" -A Itanium``
For compatibility with CMake versions prior to 3.1, one may specify For compatibility with CMake versions prior to 3.1, one may specify
a target platform name optionally at the end of the generator name. a target platform name optionally at the end of the generator name.

View File

@@ -17,14 +17,15 @@ Platform Selection
The default target platform name (architecture) is ``Win32``. The default target platform name (architecture) is ``Win32``.
The :variable:`CMAKE_GENERATOR_PLATFORM` variable may be set, perhaps .. versionadded:: 3.1
via the :manual:`cmake(1)` ``-A`` option, to specify a target platform The :variable:`CMAKE_GENERATOR_PLATFORM` variable may be set, perhaps
name (architecture). For example: via the :manual:`cmake(1)` ``-A`` option, to specify a target platform
name (architecture). For example:
* ``cmake -G "Visual Studio 11 2012" -A Win32`` * ``cmake -G "Visual Studio 11 2012" -A Win32``
* ``cmake -G "Visual Studio 11 2012" -A x64`` * ``cmake -G "Visual Studio 11 2012" -A x64``
* ``cmake -G "Visual Studio 11 2012" -A ARM`` * ``cmake -G "Visual Studio 11 2012" -A ARM``
* ``cmake -G "Visual Studio 11 2012" -A <WinCE-SDK>`` * ``cmake -G "Visual Studio 11 2012" -A <WinCE-SDK>``
(Specify a target platform matching a Windows CE SDK name.) (Specify a target platform matching a Windows CE SDK name.)
For compatibility with CMake versions prior to 3.1, one may specify For compatibility with CMake versions prior to 3.1, one may specify

View File

@@ -17,13 +17,14 @@ Platform Selection
The default target platform name (architecture) is ``Win32``. The default target platform name (architecture) is ``Win32``.
The :variable:`CMAKE_GENERATOR_PLATFORM` variable may be set, perhaps .. versionadded:: 3.1
via the :manual:`cmake(1)` ``-A`` option, to specify a target platform The :variable:`CMAKE_GENERATOR_PLATFORM` variable may be set, perhaps
name (architecture). For example: via the :manual:`cmake(1)` ``-A`` option, to specify a target platform
name (architecture). For example:
* ``cmake -G "Visual Studio 12 2013" -A Win32`` * ``cmake -G "Visual Studio 12 2013" -A Win32``
* ``cmake -G "Visual Studio 12 2013" -A x64`` * ``cmake -G "Visual Studio 12 2013" -A x64``
* ``cmake -G "Visual Studio 12 2013" -A ARM`` * ``cmake -G "Visual Studio 12 2013" -A ARM``
For compatibility with CMake versions prior to 3.1, one may specify For compatibility with CMake versions prior to 3.1, one may specify
a target platform name optionally at the end of the generator name. a target platform name optionally at the end of the generator name.

View File

@@ -51,6 +51,8 @@ via the :manual:`cmake(1)` ``-T`` option, to specify another toolset.
Windows 10 SDK Maximum Version for VS 2015 Windows 10 SDK Maximum Version for VS 2015
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. versionadded:: 3.19
Microsoft stated in a "Windows 10 October 2018 Update" blog post that Windows Microsoft stated in a "Windows 10 October 2018 Update" blog post that Windows
10 SDK versions (15063, 16299, 17134, 17763) are not supported by VS 2015 and 10 SDK versions (15063, 16299, 17134, 17763) are not supported by VS 2015 and
are only supported by VS 2017 and later. Therefore by default CMake are only supported by VS 2017 and later. Therefore by default CMake

View File

@@ -14,18 +14,20 @@ projects (JavaScript, Powershell, Python, etc.) are not supported.
Instance Selection Instance Selection
^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
VS 2017 supports multiple installations on the same machine. .. versionadded:: 3.9
The :variable:`CMAKE_GENERATOR_INSTANCE` variable may be set as a VS 2017 supports multiple installations on the same machine.
cache entry containing the absolute path to a Visual Studio instance. The :variable:`CMAKE_GENERATOR_INSTANCE` variable may be set as a
If the value is not specified explicitly by the user or a toolchain file, cache entry containing the absolute path to a Visual Studio instance.
CMake queries the Visual Studio Installer to locate VS instances, chooses If the value is not specified explicitly by the user or a toolchain file,
one, and sets the variable as a cache entry to hold the value persistently. CMake queries the Visual Studio Installer to locate VS instances, chooses
one, and sets the variable as a cache entry to hold the value persistently.
When CMake first chooses an instance, if the ``VS150COMNTOOLS`` environment .. versionadded:: 3.11
variable is set and points to the ``Common7/Tools`` directory within When CMake first chooses an instance, if the ``VS150COMNTOOLS`` environment
one of the instances, that instance will be used. Otherwise, if more variable is set and points to the ``Common7/Tools`` directory within
than one instance is installed we do not define which one is chosen one of the instances, that instance will be used. Otherwise, if more
by default. than one instance is installed we do not define which one is chosen
by default.
Platform Selection Platform Selection
^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^

View File

@@ -8,14 +8,15 @@ Platform Selection
The default target platform name (architecture) is ``Win32``. The default target platform name (architecture) is ``Win32``.
The :variable:`CMAKE_GENERATOR_PLATFORM` variable may be set, perhaps .. versionadded:: 3.1
via the :manual:`cmake(1)` ``-A`` option, to specify a target platform The :variable:`CMAKE_GENERATOR_PLATFORM` variable may be set, perhaps
name (architecture). For example: via the :manual:`cmake(1)` ``-A`` option, to specify a target platform
name (architecture). For example:
* ``cmake -G "Visual Studio 9 2008" -A Win32`` * ``cmake -G "Visual Studio 9 2008" -A Win32``
* ``cmake -G "Visual Studio 9 2008" -A x64`` * ``cmake -G "Visual Studio 9 2008" -A x64``
* ``cmake -G "Visual Studio 9 2008" -A Itanium`` * ``cmake -G "Visual Studio 9 2008" -A Itanium``
* ``cmake -G "Visual Studio 9 2008" -A <WinCE-SDK>`` * ``cmake -G "Visual Studio 9 2008" -A <WinCE-SDK>``
(Specify a target platform matching a Windows CE SDK name.) (Specify a target platform matching a Windows CE SDK name.)
For compatibility with CMake versions prior to 3.1, one may specify For compatibility with CMake versions prior to 3.1, one may specify

View File

@@ -3,7 +3,8 @@ Xcode
Generate Xcode project files. Generate Xcode project files.
This supports Xcode 5.0 and above. .. versionchanged:: 3.15
This generator supports Xcode 5.0 and above.
.. _`Xcode Build System Selection`: .. _`Xcode Build System Selection`:
@@ -14,7 +15,8 @@ By default Xcode is allowed to select its own default toolchain.
The :variable:`CMAKE_GENERATOR_TOOLSET` option may be set, perhaps The :variable:`CMAKE_GENERATOR_TOOLSET` option may be set, perhaps
via the :manual:`cmake(1)` ``-T`` option, to specify another toolset. via the :manual:`cmake(1)` ``-T`` option, to specify another toolset.
This generator supports toolset specification using one of these forms: .. versionadded:: 3.19
This generator supports toolset specification using one of these forms:
* ``toolset`` * ``toolset``
* ``toolset[,key=value]*`` * ``toolset[,key=value]*``
@@ -33,3 +35,12 @@ Supported pairs are:
For example, to select the original build system under Xcode 12, For example, to select the original build system under Xcode 12,
run :manual:`cmake(1)` with the option ``-T buildsystem=1``. run :manual:`cmake(1)` with the option ``-T buildsystem=1``.
Swift Support
^^^^^^^^^^^^^
.. versionadded:: 3.4
When using the :generator:`Xcode` generator with Xcode 6.1 or higher,
one may enable the ``Swift`` language with the :command:`enable_language`
command or the :command:`project`.