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 (Minimal SYStem) make under the
34 MSYS shell.
35
36 Use this generator in a MSYS shell prompt and using make as the build
37 tool. The generated makefiles use /bin/sh as the shell to launch build
38 rules. They are not compatible with a Windows command prompt.
39
40 To build under a Windows command prompt, use the MinGW Makefiles gener‐
41 ator.
42
43 MinGW Makefiles
44 Generates makefiles for use with mingw32-make under a Windows command
45 prompt.
46
47 Use this generator under a Windows command prompt with MinGW (Minimal‐
48 ist GNU for Windows) in the PATH and using mingw32-make as the build
49 tool. The generated makefiles use cmd.exe as the shell to launch build
50 rules. They are not compatible with MSYS or a unix shell.
51
52 To build under the MSYS shell, use the MSYS Makefiles generator.
53
54 NMake Makefiles
55 Generates NMake makefiles.
56
57 NMake Makefiles JOM
58 Generates JOM makefiles.
59
60 Unix Makefiles
61 Generates standard UNIX makefiles.
62
63 A hierarchy of UNIX makefiles is generated into the build tree. Use
64 any standard UNIX-style make program to build the project through the
65 all target and install the project through the install (or
66 install/strip) target.
67
68 For each subdirectory sub/dir of the project a UNIX makefile will be
69 created, containing the following targets:
70
71 all Depends on all targets required by the subdirectory.
72
73 install
74 Runs the install step in the subdirectory, if any.
75
76 install/strip
77 Runs the install step in the subdirectory followed by a
78 CMAKE_STRIP command, if any.
79
80 The CMAKE_STRIP variable will contain the platform’s strip util‐
81 ity, which removes symbols information from generated binaries.
82
83 test Runs the test step in the subdirectory, if any.
84
85 package
86 Runs the package step in the subdirectory, if any.
87
88 Watcom WMake
89 Generates Watcom WMake makefiles.
90
91 Ninja Generators
92 Ninja
93 Generates build.ninja files.
94
95 A build.ninja file is generated into the build tree. Use the ninja
96 program to build the project through the all target and install the
97 project through the install (or install/strip) target.
98
99 For each subdirectory sub/dir of the project, additional targets are
100 generated:
101
102 sub/dir/all
103 Depends on all targets required by the subdirectory.
104
105 sub/dir/install
106 Runs the install step in the subdirectory, if any.
107
108 sub/dir/install/strip
109 Runs the install step in the subdirectory followed by a
110 CMAKE_STRIP command, if any.
111
112 The CMAKE_STRIP variable will contain the platform’s strip util‐
113 ity, which removes symbols information from generated binaries.
114
115 sub/dir/test
116 Runs the test step in the subdirectory, if any.
117
118 sub/dir/package
119 Runs the package step in the subdirectory, if any.
120
121 Fortran Support
122 The Ninja generator conditionally supports Fortran when the ninja tool
123 is at least version 1.10 (which has the required features).
124
125 See Also
126 The Ninja Multi-Config generator is similar to the Ninja generator, but
127 generates multiple configurations at once.
128
129 Ninja Multi-Config
130 New in version 3.17.
131
132
133 Generates multiple build-<Config>.ninja files.
134
135 This generator is very much like the Ninja generator, but with some key
136 differences. Only these differences will be discussed in this document.
137
138 Unlike the Ninja generator, Ninja Multi-Config generates multiple con‐
139 figurations at once with CMAKE_CONFIGURATION_TYPES instead of only one
140 configuration with CMAKE_BUILD_TYPE. One build-<Config>.ninja file will
141 be generated for each of these configurations (with <Config> being the
142 configuration name.) These files are intended to be run with ninja -f
143 build-<Config>.ninja. A build.ninja file is also generated, using the
144 configuration from either CMAKE_DEFAULT_BUILD_TYPE or the first item
145 from CMAKE_CONFIGURATION_TYPES.
146
147 cmake --build . --config <Config> will always use build-<Config>.ninja
148 to build. If no --config argument is specified, cmake --build . will
149 use build.ninja.
150
151 Each build-<Config>.ninja file contains <target> targets as well as
152 <target>:<Config> targets, where <Config> is the same as the configura‐
153 tion specified in build-<Config>.ninja Additionally, if cross-config
154 mode is enabled, build-<Config>.ninja may contain <target>:<OtherCon‐
155 fig> targets, where <OtherConfig> is a cross-config, as well as <tar‐
156 get>:all, which builds the target in all cross-configs. See below for
157 how to enable cross-config mode.
158
159 The Ninja Multi-Config generator recognizes the following variables:
160
161 CMAKE_CONFIGURATION_TYPES
162 Specifies the total set of configurations to build.
163
164 CMAKE_CROSS_CONFIGS
165 Specifies a semicolon-separated list of configurations available
166 from all build-<Config>.ninja files.
167
168 CMAKE_DEFAULT_BUILD_TYPE
169 Specifies the configuration to use by default in a build.ninja
170 file.
171
172 CMAKE_DEFAULT_CONFIGS
173 Specifies a semicolon-separated list of configurations to build
174 for a target in build.ninja if no :<Config> suffix is specified.
175
176 Consider the following example:
177
178 cmake_minimum_required(VERSION 3.16)
179 project(MultiConfigNinja C)
180
181 add_executable(generator generator.c)
182 add_custom_command(OUTPUT generated.c COMMAND generator generated.c)
183 add_library(generated ${CMAKE_BINARY_DIR}/generated.c)
184
185 Now assume you configure the project with Ninja Multi-Config and run
186 one of the following commands:
187
188 ninja -f build-Debug.ninja generated
189 # OR
190 cmake --build . --config Debug --target generated
191
192 This would build the Debug configuration of generator, which would be
193 used to generate generated.c, which would be used to build the Debug
194 configuration of generated.
195
196 But if CMAKE_CROSS_CONFIGS is set to all, and you run the following
197 instead:
198
199 ninja -f build-Release.ninja generated:Debug
200 # OR
201 cmake --build . --config Release --target generated:Debug
202
203 This would build the Release configuration of generator, which would be
204 used to generate generated.c, which would be used to build the Debug
205 configuration of generated. This is useful for running a release-opti‐
206 mized version of a generator utility while still building the debug
207 version of the targets built with the generated code.
208
209 IDE Build Tool Generators
210 These generators support Integrated Development Environment (IDE)
211 project files. Since the IDEs configure their own environment one may
212 launch CMake from any environment.
213
214 Visual Studio Generators
215 Visual Studio 6
216 Removed. This once generated Visual Studio 6 project files, but the
217 generator has been removed since CMake 3.6. It is still possible to
218 build with VS 6 tools using the NMake Makefiles generator.
219
220 Visual Studio 7
221 Removed. This once generated Visual Studio .NET 2002 project files,
222 but the generator has been removed since CMake 3.6. It is still possi‐
223 ble to build with VS 7.0 tools using the NMake Makefiles generator.
224
225 Visual Studio 7 .NET 2003
226 Removed. This once generated Visual Studio .NET 2003 project files,
227 but the generator has been removed since CMake 3.9. It is still possi‐
228 ble to build with VS 7.1 tools using the NMake Makefiles generator.
229
230 Visual Studio 8 2005
231 Removed. This once generated Visual Studio 8 2005 project files, but
232 the generator has been removed since CMake 3.12. It is still possible
233 to build with VS 2005 tools using the NMake Makefiles generator.
234
235 Visual Studio 9 2008
236 Generates Visual Studio 9 2008 project files.
237
238 Platform Selection
239 The default target platform name (architecture) is Win32.
240
241 The CMAKE_GENERATOR_PLATFORM variable may be set, perhaps via the
242 cmake(1) -A option, to specify a target platform name (architecture).
243 For example:
244
245 · cmake -G "Visual Studio 9 2008" -A Win32
246
247 · cmake -G "Visual Studio 9 2008" -A x64
248
249 · cmake -G "Visual Studio 9 2008" -A Itanium
250
251 · cmake -G "Visual Studio 9 2008" -A <WinCE-SDK> (Specify a target
252 platform matching a Windows CE SDK name.)
253
254 For compatibility with CMake versions prior to 3.1, one may specify a
255 target platform name optionally at the end of the generator name. This
256 is supported only for:
257
258 Visual Studio 9 2008 Win64
259 Specify target platform x64.
260
261 Visual Studio 9 2008 IA64
262 Specify target platform Itanium.
263
264 Visual Studio 9 2008 <WinCE-SDK>
265 Specify target platform matching a Windows CE SDK name.
266
267 Visual Studio 10 2010
268 Generates Visual Studio 10 (VS 2010) project files.
269
270 For compatibility with CMake versions prior to 3.0, one may specify
271 this generator using the name Visual Studio 10 without the year compo‐
272 nent.
273
274 Project Types
275 Only Visual C++ and C# projects may be generated. Other types of
276 projects (Database, Website, etc.) are not supported.
277
278 Platform Selection
279 The default target platform name (architecture) is Win32.
280
281 The CMAKE_GENERATOR_PLATFORM variable may be set, perhaps via the
282 cmake(1) -A option, to specify a target platform name (architecture).
283 For example:
284
285 · cmake -G "Visual Studio 10 2010" -A Win32
286
287 · cmake -G "Visual Studio 10 2010" -A x64
288
289 · cmake -G "Visual Studio 10 2010" -A Itanium
290
291 For compatibility with CMake versions prior to 3.1, one may specify a
292 target platform name optionally at the end of the generator name. This
293 is supported only for:
294
295 Visual Studio 10 2010 Win64
296 Specify target platform x64.
297
298 Visual Studio 10 2010 IA64
299 Specify target platform Itanium.
300
301 Toolset Selection
302 The v100 toolset that comes with Visual Studio 10 2010 is selected by
303 default. The CMAKE_GENERATOR_TOOLSET option may be set, perhaps via
304 the cmake(1) -T option, to specify another toolset.
305
306 Visual Studio 11 2012
307 Generates Visual Studio 11 (VS 2012) project files.
308
309 For compatibility with CMake versions prior to 3.0, one may specify
310 this generator using the name “Visual Studio 11” without the year com‐
311 ponent.
312
313 Project Types
314 Only Visual C++ and C# projects may be generated. Other types of
315 projects (JavaScript, Database, Website, etc.) are not supported.
316
317 Platform Selection
318 The default target platform name (architecture) is Win32.
319
320 The CMAKE_GENERATOR_PLATFORM variable may be set, perhaps via the
321 cmake(1) -A option, to specify a target platform name (architecture).
322 For example:
323
324 · cmake -G "Visual Studio 11 2012" -A Win32
325
326 · cmake -G "Visual Studio 11 2012" -A x64
327
328 · cmake -G "Visual Studio 11 2012" -A ARM
329
330 · cmake -G "Visual Studio 11 2012" -A <WinCE-SDK> (Specify a target
331 platform matching a Windows CE SDK name.)
332
333 For compatibility with CMake versions prior to 3.1, one may specify a
334 target platform name optionally at the end of the generator name. This
335 is supported only for:
336
337 Visual Studio 11 2012 Win64
338 Specify target platform x64.
339
340 Visual Studio 11 2012 ARM
341 Specify target platform ARM.
342
343 Visual Studio 11 2012 <WinCE-SDK>
344 Specify target platform matching a Windows CE SDK name.
345
346 Toolset Selection
347 The v110 toolset that comes with Visual Studio 11 2012 is selected by
348 default. The CMAKE_GENERATOR_TOOLSET option may be set, perhaps via
349 the cmake(1) -T option, to specify another toolset.
350
351 Visual Studio 12 2013
352 Generates Visual Studio 12 (VS 2013) project files.
353
354 For compatibility with CMake versions prior to 3.0, one may specify
355 this generator using the name “Visual Studio 12” without the year com‐
356 ponent.
357
358 Project Types
359 Only Visual C++ and C# projects may be generated. Other types of
360 projects (JavaScript, Powershell, Python, etc.) are not supported.
361
362 Platform Selection
363 The default target platform name (architecture) is Win32.
364
365 The CMAKE_GENERATOR_PLATFORM variable may be set, perhaps via the
366 cmake(1) -A option, to specify a target platform name (architecture).
367 For example:
368
369 · cmake -G "Visual Studio 12 2013" -A Win32
370
371 · cmake -G "Visual Studio 12 2013" -A x64
372
373 · cmake -G "Visual Studio 12 2013" -A ARM
374
375 For compatibility with CMake versions prior to 3.1, one may specify a
376 target platform name optionally at the end of the generator name. This
377 is supported only for:
378
379 Visual Studio 12 2013 Win64
380 Specify target platform x64.
381
382 Visual Studio 12 2013 ARM
383 Specify target platform ARM.
384
385 Toolset Selection
386 The v120 toolset that comes with Visual Studio 12 2013 is selected by
387 default. The CMAKE_GENERATOR_TOOLSET option may be set, perhaps via
388 the cmake(1) -T option, to specify another toolset.
389
390 For each toolset that comes with this version of Visual Studio, there
391 are variants that are themselves compiled for 32-bit (x86) and 64-bit
392 (x64) hosts (independent of the architecture they target). By default
393 this generator uses the 32-bit variant even on a 64-bit host. One may
394 explicitly request use of either the 32-bit or 64-bit host tools by
395 adding either host=x86 or host=x64 to the toolset specification. See
396 the CMAKE_GENERATOR_TOOLSET variable for details.
397
398 Visual Studio 14 2015
399 New in version 3.1.
400
401
402 Generates Visual Studio 14 (VS 2015) project files.
403
404 Project Types
405 Only Visual C++ and C# projects may be generated. Other types of
406 projects (JavaScript, Powershell, Python, etc.) are not supported.
407
408 Platform Selection
409 The default target platform name (architecture) is Win32.
410
411 The CMAKE_GENERATOR_PLATFORM variable may be set, perhaps via the
412 cmake(1) -A option, to specify a target platform name (architecture).
413 For example:
414
415 · cmake -G "Visual Studio 14 2015" -A Win32
416
417 · cmake -G "Visual Studio 14 2015" -A x64
418
419 · cmake -G "Visual Studio 14 2015" -A ARM
420
421 For compatibility with CMake versions prior to 3.1, one may specify a
422 target platform name optionally at the end of the generator name. This
423 is supported only for:
424
425 Visual Studio 14 2015 Win64
426 Specify target platform x64.
427
428 Visual Studio 14 2015 ARM
429 Specify target platform ARM.
430
431 Toolset Selection
432 The v140 toolset that comes with Visual Studio 14 2015 is selected by
433 default. The CMAKE_GENERATOR_TOOLSET option may be set, perhaps via
434 the cmake(1) -T option, to specify another toolset.
435
436 For each toolset that comes with this version of Visual Studio, there
437 are variants that are themselves compiled for 32-bit (x86) and 64-bit
438 (x64) hosts (independent of the architecture they target). By default
439 this generator uses the 32-bit variant even on a 64-bit host. One may
440 explicitly request use of either the 32-bit or 64-bit host tools by
441 adding either host=x86 or host=x64 to the toolset specification. See
442 the CMAKE_GENERATOR_TOOLSET variable for details.
443
444 Windows 10 SDK Maximum Version for VS 2015
445 Microsoft stated in a “Windows 10 October 2018 Update” blog post that
446 Windows 10 SDK versions (15063, 16299, 17134, 17763) are not supported
447 by VS 2015 and are only supported by VS 2017 and later. Therefore by
448 default CMake automatically ignores Windows 10 SDKs beyond
449 10.0.14393.0.
450
451 However, there are other recommendations for certain driver/Win32
452 builds that indicate otherwise. A user can override this behavior by
453 either setting the CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION_MAXIMUM to
454 a false value or setting the CMAKE_VS_WINDOWS_TARGET_PLATFORM_VER‐
455 SION_MAXIMUM to the string value of the required maximum (e.g.
456 10.0.15063.0).
457
458 Visual Studio 15 2017
459 New in version 3.7.1.
460
461
462 Generates Visual Studio 15 (VS 2017) project files.
463
464 Project Types
465 Only Visual C++ and C# projects may be generated. Other types of
466 projects (JavaScript, Powershell, Python, etc.) are not supported.
467
468 Instance Selection
469 VS 2017 supports multiple installations on the same machine. The
470 CMAKE_GENERATOR_INSTANCE variable may be set as a cache entry contain‐
471 ing the absolute path to a Visual Studio instance. If the value is not
472 specified explicitly by the user or a toolchain file, CMake queries the
473 Visual Studio Installer to locate VS instances, chooses one, and sets
474 the variable as a cache entry to hold the value persistently.
475
476 When CMake first chooses an instance, if the VS150COMNTOOLS environment
477 variable is set and points to the Common7/Tools directory within one of
478 the instances, that instance will be used. Otherwise, if more than one
479 instance is installed we do not define which one is chosen by default.
480
481 Platform Selection
482 The default target platform name (architecture) is Win32.
483
484 The CMAKE_GENERATOR_PLATFORM variable may be set, perhaps via the
485 cmake(1) -A option, to specify a target platform name (architecture).
486 For example:
487
488 · cmake -G "Visual Studio 15 2017" -A Win32
489
490 · cmake -G "Visual Studio 15 2017" -A x64
491
492 · cmake -G "Visual Studio 15 2017" -A ARM
493
494 · cmake -G "Visual Studio 15 2017" -A ARM64
495
496 For compatibility with CMake versions prior to 3.1, one may specify a
497 target platform name optionally at the end of the generator name. This
498 is supported only for:
499
500 Visual Studio 15 2017 Win64
501 Specify target platform x64.
502
503 Visual Studio 15 2017 ARM
504 Specify target platform ARM.
505
506 Toolset Selection
507 The v141 toolset that comes with Visual Studio 15 2017 is selected by
508 default. The CMAKE_GENERATOR_TOOLSET option may be set, perhaps via
509 the cmake(1) -T option, to specify another toolset.
510
511 For each toolset that comes with this version of Visual Studio, there
512 are variants that are themselves compiled for 32-bit (x86) and 64-bit
513 (x64) hosts (independent of the architecture they target). By default
514 this generator uses the 32-bit variant even on a 64-bit host. One may
515 explicitly request use of either the 32-bit or 64-bit host tools by
516 adding either host=x86 or host=x64 to the toolset specification. See
517 the CMAKE_GENERATOR_TOOLSET variable for details.
518
519 Visual Studio 16 2019
520 New in version 3.14.
521
522
523 Generates Visual Studio 16 (VS 2019) project files.
524
525 Project Types
526 Only Visual C++ and C# projects may be generated. Other types of
527 projects (JavaScript, Powershell, Python, etc.) are not supported.
528
529 Instance Selection
530 VS 2019 supports multiple installations on the same machine. The
531 CMAKE_GENERATOR_INSTANCE variable may be set as a cache entry contain‐
532 ing the absolute path to a Visual Studio instance. If the value is not
533 specified explicitly by the user or a toolchain file, CMake queries the
534 Visual Studio Installer to locate VS instances, chooses one, and sets
535 the variable as a cache entry to hold the value persistently.
536
537 When CMake first chooses an instance, if the VS160COMNTOOLS environment
538 variable is set and points to the Common7/Tools directory within one of
539 the instances, that instance will be used. Otherwise, if more than one
540 instance is installed we do not define which one is chosen by default.
541
542 Platform Selection
543 The default target platform name (architecture) is that of the host and
544 is provided in the CMAKE_VS_PLATFORM_NAME_DEFAULT variable.
545
546 The CMAKE_GENERATOR_PLATFORM variable may be set, perhaps via the
547 cmake(1) -A option, to specify a target platform name (architecture).
548 For example:
549
550 · cmake -G "Visual Studio 16 2019" -A Win32
551
552 · cmake -G "Visual Studio 16 2019" -A x64
553
554 · cmake -G "Visual Studio 16 2019" -A ARM
555
556 · cmake -G "Visual Studio 16 2019" -A ARM64
557
558 Toolset Selection
559 The v142 toolset that comes with Visual Studio 16 2019 is selected by
560 default. The CMAKE_GENERATOR_TOOLSET option may be set, perhaps via
561 the cmake(1) -T option, to specify another toolset.
562
563 For each toolset that comes with this version of Visual Studio, there
564 are variants that are themselves compiled for 32-bit (x86) and 64-bit
565 (x64) hosts (independent of the architecture they target). By default
566 this generator uses the 64-bit variant on x64 hosts and the 32-bit
567 variant otherwise. One may explicitly request use of either the 32-bit
568 or 64-bit host tools by adding either host=x86 or host=x64 to the
569 toolset specification. See the CMAKE_GENERATOR_TOOLSET variable for
570 details.
571
572 Other Generators
573 Green Hills MULTI
574 New in version 3.3.
575
576
577 Generates Green Hills MULTI project files (experimental,
578 work-in-progress).
579
580 The buildsystem has predetermined build-configuration settings that can
581 be controlled via the CMAKE_BUILD_TYPE variable.
582
583 Customizations that are used to pick toolset and target system:
584
585 The -A <arch> can be supplied for setting the target architecture.
586 <arch> usually is one of arm, ppc, 86, etcetera. If the target archi‐
587 tecture is not specified then the default architecture of arm will be
588 used.
589
590 The -T <toolset> option can be used to set the directory location of
591 the toolset. Both absolute and relative paths are valid. Relative
592 paths use GHS_TOOLSET_ROOT as the root. If the toolset is not specified
593 then the latest toolset found in GHS_TOOLSET_ROOT will be used.
594
595 Cache variables that are used for toolset and target system customiza‐
596 tion:
597
598 · GHS_TARGET_PLATFORM
599 Defaults to integrity.
600 Usual values are integrity, threadx, uvelosity, velosity,
601 vxworks, standalone.
602
603
604 · GHS_PRIMARY_TARGET
605 Sets primaryTarget entry in project file.
606 Defaults to <arch>_<GHS_TARGET_PLATFORM>.tgt.
607
608
609 · GHS_TOOLSET_ROOT
610 Root path for toolset searches.
611 Defaults to C:/ghs in Windows or /usr/ghs in Linux.
612
613
614 · GHS_OS_ROOT
615 Root path for RTOS searches.
616 Defaults to C:/ghs in Windows or /usr/ghs in Linux.
617
618
619 · GHS_OS_DIR and GHS_OS_DIR_OPTION
620 Sets -os_dir entry in project file.
621 Defaults to latest platform OS installation at GHS_OS_ROOT. Set this value if
622 a specific RTOS is to be used.
623 GHS_OS_DIR_OPTION default value is -os_dir.
624
625
626 · GHS_BSP_NAME
627 Sets -bsp entry in project file.
628 Defaults to sim<arch> for integrity platforms.
629
630
631 Customizations are available through the following cache variables:
632
633 · GHS_CUSTOMIZATION
634
635 · GHS_GPJ_MACROS
636
637 The following properties are available:
638
639 · GHS_INTEGRITY_APP
640
641 · GHS_NO_SOURCE_GROUP_FILE
642
643 NOTE:
644 This generator is deemed experimental as of CMake 3.19.7 and is
645 still a work in progress. Future versions of CMake may make break‐
646 ing changes as the generator matures.
647
648 Xcode
649 Generate Xcode project files.
650
651 This supports Xcode 5.0 and above.
652
653 Toolset and Build System Selection
654 By default Xcode is allowed to select its own default toolchain. The
655 CMAKE_GENERATOR_TOOLSET option may be set, perhaps via the cmake(1) -T
656 option, to specify another toolset.
657
658 This generator supports toolset specification using one of these forms:
659
660 · toolset
661
662 · toolset[,key=value]*
663
664 · key=value[,key=value]*
665
666 The toolset specifies the toolset name. The selected toolset name is
667 provided in the CMAKE_XCODE_PLATFORM_TOOLSET variable.
668
669 The key=value pairs form a comma-separated list of options to specify
670 generator-specific details of the toolset selection. Supported pairs
671 are:
672
673 buildsystem=<variant>
674 Specify the buildsystem variant to use. See the
675 CMAKE_XCODE_BUILD_SYSTEM variable for allowed values.
676
677 For example, to select the original build system under Xcode 12,
678 run cmake(1) with the option -T buildsystem=1.
679
681 Some of the CMake Generators listed in the cmake(1) command-line tool
682 --help output may have variants that specify an extra generator for an
683 auxiliary IDE tool. Such generator names have the form <extra-genera‐
684 tor> - <main-generator>. The following extra generators are known to
685 CMake.
686
687 CodeBlocks
688 Generates CodeBlocks project files.
689
690 Project files for CodeBlocks will be created in the top directory and
691 in every subdirectory which features a CMakeLists.txt file containing a
692 project() call. Additionally a hierarchy of makefiles is generated
693 into the build tree. The CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES vari‐
694 able may be set to ON to exclude any files which are located outside of
695 the project root directory. The appropriate make program can build the
696 project through the default all target. An install target is also pro‐
697 vided.
698
699 This “extra” generator may be specified as:
700
701 CodeBlocks - MinGW Makefiles
702 Generate with MinGW Makefiles.
703
704 CodeBlocks - NMake Makefiles
705 Generate with NMake Makefiles.
706
707 CodeBlocks - NMake Makefiles JOM
708 Generate with NMake Makefiles JOM.
709
710 CodeBlocks - Ninja
711 Generate with Ninja.
712
713 CodeBlocks - Unix Makefiles
714 Generate with Unix Makefiles.
715
716 CodeLite
717 Generates CodeLite project files.
718
719 Project files for CodeLite will be created in the top directory and in
720 every subdirectory which features a CMakeLists.txt file containing a
721 project() call. The CMAKE_CODELITE_USE_TARGETS variable may be set to
722 ON to change the default behavior from projects to targets as the basis
723 for project files. The appropriate make program can build the project
724 through the default all target. An install target is also provided.
725
726 This “extra” generator may be specified as:
727
728 CodeLite - MinGW Makefiles
729 Generate with MinGW Makefiles.
730
731 CodeLite - NMake Makefiles
732 Generate with NMake Makefiles.
733
734 CodeLite - Ninja
735 Generate with Ninja.
736
737 CodeLite - Unix Makefiles
738 Generate with Unix Makefiles.
739
740 Eclipse CDT4
741 Generates Eclipse CDT 4.0 project files.
742
743 Project files for Eclipse will be created in the top directory. In out
744 of source builds, a linked resource to the top level source directory
745 will be created. Additionally a hierarchy of makefiles is generated
746 into the build tree. The appropriate make program can build the
747 project through the default all target. An install target is also pro‐
748 vided.
749
750 This “extra” generator may be specified as:
751
752 Eclipse CDT4 - MinGW Makefiles
753 Generate with MinGW Makefiles.
754
755 Eclipse CDT4 - NMake Makefiles
756 Generate with NMake Makefiles.
757
758 Eclipse CDT4 - Ninja
759 Generate with Ninja.
760
761 Eclipse CDT4 - Unix Makefiles
762 Generate with Unix Makefiles.
763
764 Kate
765 Generates Kate project files.
766
767 A project file for Kate will be created in the top directory in the top
768 level build directory. To use it in Kate, the Project plugin must be
769 enabled. The project file is loaded in Kate by opening the Project‐
770 Name.kateproject file in the editor. If the Kate Build-plugin is
771 enabled, all targets generated by CMake are available for building.
772
773 This “extra” generator may be specified as:
774
775 Kate - MinGW Makefiles
776 Generate with MinGW Makefiles.
777
778 Kate - NMake Makefiles
779 Generate with NMake Makefiles.
780
781 Kate - Ninja
782 Generate with Ninja.
783
784 Kate - Unix Makefiles
785 Generate with Unix Makefiles.
786
787 Sublime Text 2
788 Generates Sublime Text 2 project files.
789
790 Project files for Sublime Text 2 will be created in the top directory
791 and in every subdirectory which features a CMakeLists.txt file contain‐
792 ing a project() call. Additionally Makefiles (or build.ninja files)
793 are generated into the build tree. The appropriate make program can
794 build the project through the default all target. An install target is
795 also provided.
796
797 This “extra” generator may be specified as:
798
799 Sublime Text 2 - MinGW Makefiles
800 Generate with MinGW Makefiles.
801
802 Sublime Text 2 - NMake Makefiles
803 Generate with NMake Makefiles.
804
805 Sublime Text 2 - Ninja
806 Generate with Ninja.
807
808 Sublime Text 2 - Unix Makefiles
809 Generate with Unix Makefiles.
810
812 2000-2021 Kitware, Inc. and Contributors
813
814
815
816
8173.19.7 Mar 15, 2021 CMAKE-GENERATORS(7)