1.. cmake-manual-description: CMake Generators Reference
2
3cmake-generators(7)
4*******************
5
6.. only:: html
7
8   .. contents::
9
10Introduction
11============
12
13A *CMake Generator* is responsible for writing the input files for
14a native build system.  Exactly one of the `CMake Generators`_ must be
15selected for a build tree to determine what native build system is to
16be used.  Optionally one of the `Extra Generators`_ may be selected
17as a variant of some of the `Command-Line Build Tool Generators`_ to
18produce project files for an auxiliary IDE.
19
20CMake Generators are platform-specific so each may be available only
21on certain platforms.  The :manual:`cmake(1)` command-line tool ``--help``
22output lists available generators on the current platform.  Use its ``-G``
23option to specify the generator for a new build tree.
24The :manual:`cmake-gui(1)` offers interactive selection of a generator
25when creating a new build tree.
26
27CMake Generators
28================
29
30.. _`Command-Line Build Tool Generators`:
31
32Command-Line Build Tool Generators
33----------------------------------
34
35These generators support command-line build tools.  In order to use them,
36one must launch CMake from a command-line prompt whose environment is
37already configured for the chosen compiler and build tool.
38
39.. _`Makefile Generators`:
40
41Makefile Generators
42^^^^^^^^^^^^^^^^^^^
43
44.. toctree::
45   :maxdepth: 1
46
47   /generator/Borland Makefiles
48   /generator/MSYS Makefiles
49   /generator/MinGW Makefiles
50   /generator/NMake Makefiles
51   /generator/NMake Makefiles JOM
52   /generator/Unix Makefiles
53   /generator/Watcom WMake
54
55.. _`Ninja Generators`:
56
57Ninja Generators
58^^^^^^^^^^^^^^^^
59
60.. toctree::
61   :maxdepth: 1
62
63   /generator/Ninja
64   /generator/Ninja Multi-Config
65
66.. _`IDE Build Tool Generators`:
67
68IDE Build Tool Generators
69-------------------------
70
71These generators support Integrated Development Environment (IDE)
72project files.  Since the IDEs configure their own environment
73one may launch CMake from any environment.
74
75.. _`Visual Studio Generators`:
76
77Visual Studio Generators
78^^^^^^^^^^^^^^^^^^^^^^^^
79
80.. toctree::
81   :maxdepth: 1
82
83   /generator/Visual Studio 6
84   /generator/Visual Studio 7
85   /generator/Visual Studio 7 .NET 2003
86   /generator/Visual Studio 8 2005
87   /generator/Visual Studio 9 2008
88   /generator/Visual Studio 10 2010
89   /generator/Visual Studio 11 2012
90   /generator/Visual Studio 12 2013
91   /generator/Visual Studio 14 2015
92   /generator/Visual Studio 15 2017
93   /generator/Visual Studio 16 2019
94   /generator/Visual Studio 17 2022
95
96Other Generators
97^^^^^^^^^^^^^^^^
98
99.. toctree::
100   :maxdepth: 1
101
102   /generator/Green Hills MULTI
103   /generator/Xcode
104
105Extra Generators
106================
107
108Some of the `CMake Generators`_ listed in the :manual:`cmake(1)`
109command-line tool ``--help`` output may have variants that specify
110an extra generator for an auxiliary IDE tool.  Such generator
111names have the form ``<extra-generator> - <main-generator>``.
112The following extra generators are known to CMake.
113
114.. toctree::
115   :maxdepth: 1
116
117   /generator/CodeBlocks
118   /generator/CodeLite
119   /generator/Eclipse CDT4
120   /generator/Kate
121   /generator/Sublime Text 2
122