1CMAKE-GENERATORS(7) CMake CMAKE-GENERATORS(7)
2
3
4
6 cmake-generators - CMake Generators Reference
7
9 A CMake Generator is responsible for writing the input files for a
10 native build system. Exactly one of the CMake Generators must be
11 selected for a build tree to determine what native build system is to
12 be used. Optionally one of the Extra Generators may be selected as a
13 variant of some of the Command-Line Build Tool Generators to produce
14 project files for an auxiliary IDE.
15
16 CMake Generators are platform-specific so each may be available only on
17 certain platforms. The cmake(1) command-line tool --help output lists
18 available generators on the current platform. Use its -G option to
19 specify the generator for a new build tree. The cmake-gui(1) offers
20 interactive selection of a generator when creating a new build tree.
21
23 Command-Line Build Tool Generators
24 These generators support command-line build tools. In order to use
25 them, one must launch CMake from a command-line prompt whose environ‐
26 ment is already configured for the chosen compiler and build tool.
27
28 Makefile Generators
29 Borland Makefiles
30 Generates Borland makefiles.
31
32 MSYS Makefiles
33 Generates makefiles for use with MSYS make under the MSYS shell.
34
35 Use this generator in a MSYS shell prompt and using make as the build
36 tool. The generated makefiles use /bin/sh as the shell to launch build
37 rules. They are not compatible with a Windows command prompt.
38
39 To build under a Windows command prompt, use the MinGW Makefiles gener‐
40 ator.
41
42 MinGW Makefiles
43 Generates makefiles for use with mingw32-make under a Windows command
44 prompt.
45
46 Use this generator under a Windows command prompt with MinGW in the
47 PATH and using mingw32-make as the build tool. The generated makefiles
48 use cmd.exe as the shell to launch build rules. They are not compati‐
49 ble with MSYS or a unix shell.
50
51 To build under the MSYS shell, use the MSYS Makefiles generator.
52
53 NMake Makefiles
54 Generates NMake makefiles.
55
56 NMake Makefiles JOM
57 Generates JOM makefiles.
58
59 Unix Makefiles
60 Generates standard UNIX makefiles.
61
62 A hierarchy of UNIX makefiles is generated into the build tree. Any
63 standard UNIX-style make program can build the project through the
64 default make target. A “make install” target is also provided.
65
66 Watcom WMake
67 Generates Watcom WMake makefiles.
68
69 Ninja Generator
70 Ninja
71 Generates build.ninja files.
72
73 A build.ninja file is generated into the build tree. Recent versions
74 of the ninja program can build the project through the “all” target.
75 An “install” target is also provided.
76
77 For each subdirectory sub/dir of the project, additional targets are
78 generated:
79
80 sub/dir/all
81 Depends on all targets required by the subdirectory.