1CMAKE-VARIABLES(7) CMake CMAKE-VARIABLES(7)
2
3
4
6 cmake-variables - CMake Variables Reference
7
8 This page documents variables that are provided by CMake or have mean‐
9 ing to CMake when set by project code.
10
11 For general information on variables, see the Variables section in the
12 cmake-language manual.
13
14 NOTE:
15 CMake reserves identifiers that:
16
17 · begin with CMAKE_ (upper-, lower-, or mixed-case), or
18
19 · begin with _CMAKE_ (upper-, lower-, or mixed-case), or
20
21 · begin with _ followed by the name of any CMake Command.
22
24 CMAKE_AR
25 Name of archiving tool for static libraries.
26
27 This specifies the name of the program that creates archive or static
28 libraries.
29
30 CMAKE_ARGC
31 Number of command line arguments passed to CMake in script mode.
32
33 When run in -P script mode, CMake sets this variable to the number of
34 command line arguments. See also CMAKE_ARGV0, 1, 2 …
35
36 CMAKE_ARGV0
37 Command line argument passed to CMake in script mode.
38
39 When run in -P script mode, CMake sets this variable to the first com‐
40 mand line argument. It then also sets CMAKE_ARGV1, CMAKE_ARGV2, … and
41 so on, up to the number of command line arguments given. See also
42 CMAKE_ARGC.
43
44 CMAKE_BINARY_DIR
45 The path to the top level of the build tree.
46
47 This is the full path to the top level of the current CMake build tree.
48 For an in-source build, this would be the same as CMAKE_SOURCE_DIR.
49
50 When run in -P script mode, CMake sets the variables CMAKE_BINARY_DIR,
51 CMAKE_SOURCE_DIR, CMAKE_CURRENT_BINARY_DIR and CMAKE_CURRENT_SOURCE_DIR
52 to the current working directory.
53
54 CMAKE_BUILD_TOOL
55 This variable exists only for backwards compatibility. It contains the
56 same value as CMAKE_MAKE_PROGRAM. Use that variable instead.
57
58 CMAKE_CACHEFILE_DIR
59 The directory with the CMakeCache.txt file.
60
61 This is the full path to the directory that has the CMakeCache.txt file
62 in it. This is the same as CMAKE_BINARY_DIR.
63
64 CMAKE_CACHE_MAJOR_VERSION
65 Major version of CMake used to create the CMakeCache.txt file
66
67 This stores the major version of CMake used to write a CMake cache
68 file. It is only different when a different version of CMake is run on
69 a previously created cache file.
70
71 CMAKE_CACHE_MINOR_VERSION
72 Minor version of CMake used to create the CMakeCache.txt file
73
74 This stores the minor version of CMake used to write a CMake cache
75 file. It is only different when a different version of CMake is run on
76 a previously created cache file.
77
78 CMAKE_CACHE_PATCH_VERSION
79 Patch version of CMake used to create the CMakeCache.txt file
80
81 This stores the patch version of CMake used to write a CMake cache
82 file. It is only different when a different version of CMake is run on
83 a previously created cache file.
84
85 CMAKE_CFG_INTDIR
86 Build-time reference to per-configuration output subdirectory.
87
88 For native build systems supporting multiple configurations in the
89 build tree (such as Visual Studio Generators and Xcode), the value is a
90 reference to a build-time variable specifying the name of the per-con‐
91 figuration output subdirectory. On Makefile Generators this evaluates
92 to . because there is only one configuration in a build tree. Example
93 values:
94
95 $(ConfigurationName) = Visual Studio 9
96 $(Configuration) = Visual Studio 10
97 $(CONFIGURATION) = Xcode
98 . = Make-based tools
99 . = Ninja
100 ${CONFIGURATION} = Ninja Multi-Config
101
102 Note that this variable only has limited support on Ninja Multi-Config.
103 It is recommended that you use the $<CONFIG> generator expression
104 instead.
105
106 Since these values are evaluated by the native build system, this vari‐
107 able is suitable only for use in command lines that will be evaluated
108 at build time. Example of intended usage:
109
110 add_executable(mytool mytool.c)
111 add_custom_command(
112 OUTPUT out.txt
113 COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/mytool
114 ${CMAKE_CURRENT_SOURCE_DIR}/in.txt out.txt
115 DEPENDS mytool in.txt
116 )
117 add_custom_target(drive ALL DEPENDS out.txt)
118
119 Note that CMAKE_CFG_INTDIR is no longer necessary for this purpose but
120 has been left for compatibility with existing projects. Instead
121 add_custom_command() recognizes executable target names in its COMMAND
122 option, so ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/mytool can
123 be replaced by just mytool.
124
125 This variable is read-only. Setting it is undefined behavior. In
126 multi-configuration build systems the value of this variable is passed
127 as the value of preprocessor symbol CMAKE_INTDIR to the compilation of
128 all source files.
129
130 CMAKE_COMMAND
131 The full path to the cmake(1) executable.
132
133 This is the full path to the CMake executable cmake(1) which is useful
134 from custom commands that want to use the cmake -E option for portable
135 system commands. (e.g. /usr/local/bin/cmake)
136
137 CMAKE_CPACK_COMMAND
138 Full path to cpack(1) command installed with CMake.
139
140 This is the full path to the CPack executable cpack(1) which is useful
141 from custom commands that want to use the cmake(1) -E option for porta‐
142 ble system commands.
143
144 CMAKE_CROSSCOMPILING
145 Intended to indicate whether CMake is cross compiling, but note limita‐
146 tions discussed below.
147
148 This variable will be set to true by CMake if the CMAKE_SYSTEM_NAME
149 variable has been set manually (i.e. in a toolchain file or as a cache
150 entry from the cmake command line). In most cases, manually setting
151 CMAKE_SYSTEM_NAME will only be done when cross compiling, since it will
152 otherwise be given the same value as CMAKE_HOST_SYSTEM_NAME if not man‐
153 ually set, which is correct for the non-cross-compiling case. In the
154 event that CMAKE_SYSTEM_NAME is manually set to the same value as
155 CMAKE_HOST_SYSTEM_NAME, then CMAKE_CROSSCOMPILING will still be set to
156 true.
157
158 Another case to be aware of is that builds targeting Apple platforms
159 other than macOS are handled differently to other cross compiling sce‐
160 narios. Rather than relying on CMAKE_SYSTEM_NAME to select the target
161 platform, Apple device builds use CMAKE_OSX_SYSROOT to select the
162 appropriate SDK, which indirectly determines the target platform. Fur‐
163 thermore, when using the Xcode generator, developers can switch between
164 device and simulator builds at build time rather than having a single
165 choice at configure time, so the concept of whether the build is cross
166 compiling or not is more complex. Therefore, the use of CMAKE_CROSSCOM‐
167 PILING is not recommended for projects targeting Apple devices.
168
169 CMAKE_CROSSCOMPILING_EMULATOR
170 This variable is only used when CMAKE_CROSSCOMPILING is on. It should
171 point to a command on the host system that can run executable built for
172 the target system.
173
174 If this variable contains a semicolon-separated list, then the first
175 value is the command and remaining values are its arguments.
176
177 The command will be used to run try_run() generated executables, which
178 avoids manual population of the TryRunResults.cmake file.
179
180 It is also used as the default value for the CROSSCOMPILING_EMULATOR
181 target property of executables.
182
183 CMAKE_CTEST_COMMAND
184 Full path to ctest(1) command installed with CMake.
185
186 This is the full path to the CTest executable ctest(1) which is useful
187 from custom commands that want to use the cmake(1) -E option for porta‐
188 ble system commands.
189
190 CMAKE_CURRENT_BINARY_DIR
191 The path to the binary directory currently being processed.
192
193 This the full path to the build directory that is currently being pro‐
194 cessed by cmake. Each directory added by add_subdirectory() will cre‐
195 ate a binary directory in the build tree, and as it is being processed
196 this variable will be set. For in-source builds this is the current
197 source directory being processed.
198
199 When run in -P script mode, CMake sets the variables CMAKE_BINARY_DIR,
200 CMAKE_SOURCE_DIR, CMAKE_CURRENT_BINARY_DIR and CMAKE_CURRENT_SOURCE_DIR
201 to the current working directory.
202
203 CMAKE_CURRENT_FUNCTION
204 When executing code inside a function(), this variable contains the
205 name of the current function. It can be useful for diagnostic or debug
206 messages.
207
208 See also CMAKE_CURRENT_FUNCTION_LIST_DIR, CMAKE_CURRENT_FUNC‐
209 TION_LIST_FILE and CMAKE_CURRENT_FUNCTION_LIST_LINE.
210
211 CMAKE_CURRENT_FUNCTION_LIST_DIR
212 When executing code inside a function(), this variable contains the
213 full directory of the listfile that defined the current function.
214
215 It is quite common practice in CMake for modules to use some additional
216 files, such as templates to be copied in after substituting CMake vari‐
217 ables. In such cases, a function needs to know where to locate those
218 files in a way that doesn’t depend on where the function is called.
219 Without CMAKE_CURRENT_FUNCTION_LIST_DIR, the code to do that would typ‐
220 ically use the following pattern:
221
222 set(_THIS_MODULE_BASE_DIR "${CMAKE_CURRENT_LIST_DIR}")
223
224 function(foo)
225 configure_file(
226 "${_THIS_MODULE_BASE_DIR}/some.template.in"
227 some.output
228 )
229 endfunction()
230
231 Using CMAKE_CURRENT_FUNCTION_LIST_DIR inside the function instead elim‐
232 inates the need for the extra variable which would otherwise be visible
233 outside the function’s scope. The above example can be written in the
234 more concise and more robust form:
235
236 function(foo)
237 configure_file(
238 "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/some.template.in"
239 some.output
240 )
241 endfunction()
242
243 See also CMAKE_CURRENT_FUNCTION, CMAKE_CURRENT_FUNCTION_LIST_FILE and
244 CMAKE_CURRENT_FUNCTION_LIST_LINE.
245
246 CMAKE_CURRENT_FUNCTION_LIST_FILE
247 When executing code inside a function(), this variable contains the
248 full path to the listfile that defined the current function.
249
250 See also CMAKE_CURRENT_FUNCTION, CMAKE_CURRENT_FUNCTION_LIST_DIR and
251 CMAKE_CURRENT_FUNCTION_LIST_LINE.
252
253 CMAKE_CURRENT_FUNCTION_LIST_LINE
254 When executing code inside a function(), this variable contains the
255 line number in the listfile where the current function was defined.
256
257 See also CMAKE_CURRENT_FUNCTION, CMAKE_CURRENT_FUNCTION_LIST_DIR and
258 CMAKE_CURRENT_FUNCTION_LIST_FILE.
259
260 CMAKE_CURRENT_LIST_DIR
261 Full directory of the listfile currently being processed.
262
263 As CMake processes the listfiles in your project this variable will
264 always be set to the directory where the listfile which is currently
265 being processed (CMAKE_CURRENT_LIST_FILE) is located. The value has
266 dynamic scope. When CMake starts processing commands in a source file
267 it sets this variable to the directory where this file is located.
268 When CMake finishes processing commands from the file it restores the
269 previous value. Therefore the value of the variable inside a macro or
270 function is the directory of the file invoking the bottom-most entry on
271 the call stack, not the directory of the file containing the macro or
272 function definition.
273
274 See also CMAKE_CURRENT_LIST_FILE.
275
276 CMAKE_CURRENT_LIST_FILE
277 Full path to the listfile currently being processed.
278
279 As CMake processes the listfiles in your project this variable will
280 always be set to the one currently being processed. The value has
281 dynamic scope. When CMake starts processing commands in a source file
282 it sets this variable to the location of the file. When CMake finishes
283 processing commands from the file it restores the previous value.
284 Therefore the value of the variable inside a macro or function is the
285 file invoking the bottom-most entry on the call stack, not the file
286 containing the macro or function definition.
287
288 See also CMAKE_PARENT_LIST_FILE.
289
290 CMAKE_CURRENT_LIST_LINE
291 The line number of the current file being processed.
292
293 This is the line number of the file currently being processed by cmake.
294
295 CMAKE_CURRENT_SOURCE_DIR
296 The path to the source directory currently being processed.
297
298 This the full path to the source directory that is currently being pro‐
299 cessed by cmake.
300
301 When run in -P script mode, CMake sets the variables CMAKE_BINARY_DIR,
302 CMAKE_SOURCE_DIR, CMAKE_CURRENT_BINARY_DIR and CMAKE_CURRENT_SOURCE_DIR
303 to the current working directory.
304
305 CMAKE_DEBUG_TARGET_PROPERTIES
306 Enables tracing output for target properties.
307
308 This variable can be populated with a list of properties to generate
309 debug output for when evaluating target properties. Currently it can
310 only be used when evaluating:
311
312 · AUTOUIC_OPTIONS
313
314 · COMPILE_DEFINITIONS
315
316 · COMPILE_FEATURES
317
318 · COMPILE_OPTIONS
319
320 · INCLUDE_DIRECTORIES
321
322 · LINK_DIRECTORIES
323
324 · LINK_OPTIONS
325
326 · POSITION_INDEPENDENT_CODE
327
328 · SOURCES
329
330 target properties and any other property listed in COMPATIBLE_INTER‐
331 FACE_STRING and other COMPATIBLE_INTERFACE_ properties. It outputs an
332 origin for each entry in the target property. Default is unset.
333
334 CMAKE_DIRECTORY_LABELS
335 Specify labels for the current directory.
336
337 This is used to initialize the LABELS directory property.
338
339 CMAKE_DL_LIBS
340 Name of library containing dlopen and dlclose.
341
342 The name of the library that has dlopen and dlclose in it, usually -ldl
343 on most UNIX machines.
344
345 CMAKE_DOTNET_TARGET_FRAMEWORK
346 Default value for DOTNET_TARGET_FRAMEWORK property of targets.
347
348 This variable is used to initialize the DOTNET_TARGET_FRAMEWORK prop‐
349 erty on all targets. See that target property for additional informa‐
350 tion.
351
352 Setting CMAKE_DOTNET_TARGET_FRAMEWORK may be necessary when working
353 with C# and newer .NET framework versions to avoid referencing errors
354 with the ALL_BUILD CMake target.
355
356 This variable is only evaluated for Visual Studio Generators VS 2010
357 and above.
358
359 CMAKE_DOTNET_TARGET_FRAMEWORK_VERSION
360 Default value for DOTNET_TARGET_FRAMEWORK_VERSION property of targets.
361
362 This variable is used to initialize the DOTNET_TARGET_FRAMEWORK_VERSION
363 property on all targets. See that target property for additional infor‐
364 mation. When set, CMAKE_DOTNET_TARGET_FRAMEWORK takes precednece over
365 this variable. See that variable or the associated target property DOT‐
366 NET_TARGET_FRAMEWORK for additional information.
367
368 Setting CMAKE_DOTNET_TARGET_FRAMEWORK_VERSION may be necessary when
369 working with C# and newer .NET framework versions to avoid referencing
370 errors with the ALL_BUILD CMake target.
371
372 This variable is only evaluated for Visual Studio Generators VS 2010
373 and above.
374
375 CMAKE_EDIT_COMMAND
376 Full path to cmake-gui(1) or ccmake(1). Defined only for Makefile Gen‐
377 erators when not using an “extra” generator for an IDE.
378
379 This is the full path to the CMake executable that can graphically edit
380 the cache. For example, cmake-gui(1) or ccmake(1).
381
382 CMAKE_EXECUTABLE_SUFFIX
383 The suffix for executables on this platform.
384
385 The suffix to use for the end of an executable filename if any, .exe on
386 Windows.
387
388 CMAKE_EXECUTABLE_SUFFIX_<LANG> overrides this for language <LANG>.
389
390 CMAKE_EXTRA_GENERATOR
391 The extra generator used to build the project. See cmake-genera‐
392 tors(7).
393
394 When using the Eclipse, CodeBlocks, CodeLite, Kate or Sublime genera‐
395 tors, CMake generates Makefiles (CMAKE_GENERATOR) and additionally
396 project files for the respective IDE. This IDE project file generator
397 is stored in CMAKE_EXTRA_GENERATOR (e.g. Eclipse CDT4).
398
399 CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES
400 Additional suffixes for shared libraries.
401
402 Extensions for shared libraries other than that specified by
403 CMAKE_SHARED_LIBRARY_SUFFIX, if any. CMake uses this to recognize
404 external shared library files during analysis of libraries linked by a
405 target.
406
407 CMAKE_FIND_DEBUG_MODE
408 Print extra find call information for the following commands to stan‐
409 dard error:
410
411 · find_program()
412
413 · find_library()
414
415 · find_file()
416
417 · find_path()
418
419 · find_package()
420
421 Output is designed for human consumption and not for parsing. Enabling
422 this variable is equivalent to using cmake --debug-find with the added
423 ability to enable debugging for a subset of find calls.
424
425 set(CMAKE_FIND_DEBUG_MODE TRUE)
426 find_program(...)
427 set(CMAKE_FIND_DEBUG_MODE FALSE)
428
429 Default is unset.
430
431 CMAKE_FIND_PACKAGE_NAME
432 Defined by the find_package() command while loading a find module to
433 record the caller-specified package name. See command documentation
434 for details.
435
436 CMAKE_FIND_PACKAGE_SORT_DIRECTION
437 The sorting direction used by CMAKE_FIND_PACKAGE_SORT_ORDER. It can
438 assume one of the following values:
439
440 DEC Default. Ordering is done in descending mode. The highest
441 folder found will be tested first.
442
443 ASC Ordering is done in ascending mode. The lowest folder found
444 will be tested first.
445
446 If CMAKE_FIND_PACKAGE_SORT_ORDER is not set or is set to NONE this
447 variable has no effect.
448
449 CMAKE_FIND_PACKAGE_SORT_ORDER
450 The default order for sorting packages found using find_package(). It
451 can assume one of the following values:
452
453 NONE Default. No attempt is done to sort packages. The first valid
454 package found will be selected.
455
456 NAME Sort packages lexicographically before selecting one.
457
458 NATURAL
459 Sort packages using natural order (see strverscmp(3) manual),
460 i.e. such that contiguous digits are compared as whole numbers.
461
462 Natural sorting can be employed to return the highest version when mul‐
463 tiple versions of the same library are found by find_package(). For
464 example suppose that the following libraries have been found:
465
466 · libX-1.1.0
467
468 · libX-1.2.9
469
470 · libX-1.2.10
471
472 By setting NATURAL order we can select the one with the highest version
473 number libX-1.2.10.
474
475 set(CMAKE_FIND_PACKAGE_SORT_ORDER NATURAL)
476 find_package(libX CONFIG)
477
478 The sort direction can be controlled using the CMAKE_FIND_PACK‐
479 AGE_SORT_DIRECTION variable (by default decrescent, e.g. lib-B will be
480 tested before lib-A).
481
482 CMAKE_GENERATOR
483 The generator used to build the project. See cmake-generators(7).
484
485 The name of the generator that is being used to generate the build
486 files. (e.g. Unix Makefiles, Ninja, etc.)
487
488 The value of this variable should never be modified by project code. A
489 generator may be selected via the cmake(1) -G option, interactively in
490 cmake-gui(1), or via the CMAKE_GENERATOR environment variable.
491
492 CMAKE_GENERATOR_INSTANCE
493 Generator-specific instance specification provided by user.
494
495 Some CMake generators support selection of an instance of the native
496 build system when multiple instances are available. If the user speci‐
497 fies an instance (e.g. by setting this cache entry or via the
498 CMAKE_GENERATOR_INSTANCE environment variable), or after a default
499 instance is chosen when a build tree is first configured, the value
500 will be available in this variable.
501
502 The value of this variable should never be modified by project code. A
503 toolchain file specified by the CMAKE_TOOLCHAIN_FILE variable may ini‐
504 tialize CMAKE_GENERATOR_INSTANCE as a cache entry. Once a given build
505 tree has been initialized with a particular value for this variable,
506 changing the value has undefined behavior.
507
508 Instance specification is supported only on specific generators:
509
510 · For the Visual Studio 15 2017 generator (and above) this specifies
511 the absolute path to the VS installation directory of the selected VS
512 instance.
513
514 See native build system documentation for allowed instance values.
515
516 CMAKE_GENERATOR_PLATFORM
517 Generator-specific target platform specification provided by user.
518
519 Some CMake generators support a target platform name to be given to the
520 native build system to choose a compiler toolchain. If the user speci‐
521 fies a platform name (e.g. via the cmake(1) -A option or via the
522 CMAKE_GENERATOR_PLATFORM environment variable) the value will be avail‐
523 able in this variable.
524
525 The value of this variable should never be modified by project code. A
526 toolchain file specified by the CMAKE_TOOLCHAIN_FILE variable may ini‐
527 tialize CMAKE_GENERATOR_PLATFORM. Once a given build tree has been
528 initialized with a particular value for this variable, changing the
529 value has undefined behavior.
530
531 Platform specification is supported only on specific generators:
532
533 · For Visual Studio Generators with VS 2005 and above this specifies
534 the target architecture.
535
536 · For Green Hills MULTI this specifies the target architecture.
537
538 See native build system documentation for allowed platform names.
539
540 Visual Studio Platform Selection
541 On Visual Studio Generators the selected platform name is provided in
542 the CMAKE_VS_PLATFORM_NAME variable.
543
544 CMAKE_GENERATOR_TOOLSET
545 Native build system toolset specification provided by user.
546
547 Some CMake generators support a toolset specification to tell the
548 native build system how to choose a compiler. If the user specifies a
549 toolset (e.g. via the cmake(1) -T option or via the CMAKE_GENERA‐
550 TOR_TOOLSET environment variable) the value will be available in this
551 variable.
552
553 The value of this variable should never be modified by project code. A
554 toolchain file specified by the CMAKE_TOOLCHAIN_FILE variable may ini‐
555 tialize CMAKE_GENERATOR_TOOLSET. Once a given build tree has been ini‐
556 tialized with a particular value for this variable, changing the value
557 has undefined behavior.
558
559 Toolset specification is supported only on specific generators:
560
561 · Visual Studio Generators for VS 2010 and above
562
563 · The Xcode generator for Xcode 3.0 and above
564
565 · The Green Hills MULTI generator
566
567 See native build system documentation for allowed toolset names.
568
569 Visual Studio Toolset Selection
570 The Visual Studio Generators support toolset specification using one of
571 these forms:
572
573 · toolset
574
575 · toolset[,key=value]*
576
577 · key=value[,key=value]*
578
579 The toolset specifies the toolset name. The selected toolset name is
580 provided in the CMAKE_VS_PLATFORM_TOOLSET variable.
581
582 The key=value pairs form a comma-separated list of options to specify
583 generator-specific details of the toolset selection. Supported pairs
584 are:
585
586 cuda=<version>|<path>
587 Specify the CUDA toolkit version to use or the path to a stand‐
588 alone CUDA toolkit directory. Supported by VS 2010 and above.
589 The version can only be used with the CUDA toolkit VS integra‐
590 tion globally installed. See the CMAKE_VS_PLATFORM_TOOLSET_CUDA
591 and CMAKE_VS_PLATFORM_TOOLSET_CUDA_CUSTOM_DIR variables.
592
593 host=<arch>
594 Specify the host tools architecture as x64 or x86. Supported by
595 VS 2013 and above. See the CMAKE_VS_PLAT‐
596 FORM_TOOLSET_HOST_ARCHITECTURE variable.
597
598 version=<version>
599 Specify the toolset version to use. Supported by VS 2017 and
600 above with the specified toolset installed. See the
601 CMAKE_VS_PLATFORM_TOOLSET_VERSION variable.
602
603 VCTargetsPath=<path>
604 Specify an alternative VCTargetsPath value for Visual Studio
605 project files. This allows use of VS platform extension config‐
606 uration files (.props and .targets) that are not installed with
607 VS.
608
609 CMAKE_IMPORT_LIBRARY_PREFIX
610 The prefix for import libraries that you link to.
611
612 The prefix to use for the name of an import library if used on this
613 platform.
614
615 CMAKE_IMPORT_LIBRARY_PREFIX_<LANG> overrides this for language <LANG>.
616
617 CMAKE_IMPORT_LIBRARY_SUFFIX
618 The suffix for import libraries that you link to.
619
620 The suffix to use for the end of an import library filename if used on
621 this platform.
622
623 CMAKE_IMPORT_LIBRARY_SUFFIX_<LANG> overrides this for language <LANG>.
624
625 CMAKE_JOB_POOL_COMPILE
626 This variable is used to initialize the JOB_POOL_COMPILE property on
627 all the targets. See JOB_POOL_COMPILE for additional information.
628
629 CMAKE_JOB_POOL_LINK
630 This variable is used to initialize the JOB_POOL_LINK property on all
631 the targets. See JOB_POOL_LINK for additional information.
632
633 CMAKE_JOB_POOL_PRECOMPILE_HEADER
634 This variable is used to initialize the JOB_POOL_PRECOMPILE_HEADER
635 property on all the targets. See JOB_POOL_PRECOMPILE_HEADER for addi‐
636 tional information.
637
638 CMAKE_JOB_POOLS
639 If the JOB_POOLS global property is not set, the value of this variable
640 is used in its place. See JOB_POOLS for additional information.
641
642 CMAKE_<LANG>_COMPILER_AR
643 A wrapper around ar adding the appropriate --plugin option for the com‐
644 piler.
645
646 See also CMAKE_AR.
647
648 CMAKE_<LANG>_COMPILER_RANLIB
649 A wrapper around ranlib adding the appropriate --plugin option for the
650 compiler.
651
652 See also CMAKE_RANLIB.
653
654 CMAKE_<LANG>_LINK_LIBRARY_SUFFIX
655 Language-specific suffix for libraries that you link to.
656
657 The suffix to use for the end of a library filename, .lib on Windows.
658
659 CMAKE_LINK_LIBRARY_SUFFIX
660 The suffix for libraries that you link to.
661
662 The suffix to use for the end of a library filename, .lib on Windows.
663
664 CMAKE_LINK_SEARCH_END_STATIC
665 End a link line such that static system libraries are used.
666
667 Some linkers support switches such as -Bstatic and -Bdynamic to deter‐
668 mine whether to use static or shared libraries for -lXXX options.
669 CMake uses these options to set the link type for libraries whose full
670 paths are not known or (in some cases) are in implicit link directories
671 for the platform. By default CMake adds an option at the end of the
672 library list (if necessary) to set the linker search type back to its
673 starting type. This property switches the final linker search type to
674 -Bstatic regardless of how it started.
675
676 This variable is used to initialize the target property
677 LINK_SEARCH_END_STATIC for all targets. If set, it’s value is also used
678 by the try_compile() command.
679
680 See also CMAKE_LINK_SEARCH_START_STATIC.
681
682 CMAKE_LINK_SEARCH_START_STATIC
683 Assume the linker looks for static libraries by default.
684
685 Some linkers support switches such as -Bstatic and -Bdynamic to deter‐
686 mine whether to use static or shared libraries for -lXXX options.
687 CMake uses these options to set the link type for libraries whose full
688 paths are not known or (in some cases) are in implicit link directories
689 for the platform. By default the linker search type is assumed to be
690 -Bdynamic at the beginning of the library list. This property switches
691 the assumption to -Bstatic. It is intended for use when linking an
692 executable statically (e.g. with the GNU -static option).
693
694 This variable is used to initialize the target property
695 LINK_SEARCH_START_STATIC for all targets. If set, it’s value is also
696 used by the try_compile() command.
697
698 See also CMAKE_LINK_SEARCH_END_STATIC.
699
700 CMAKE_MAJOR_VERSION
701 First version number component of the CMAKE_VERSION variable.
702
703 CMAKE_MAKE_PROGRAM
704 Tool that can launch the native build system. The value may be the
705 full path to an executable or just the tool name if it is expected to
706 be in the PATH.
707
708 The tool selected depends on the CMAKE_GENERATOR used to configure the
709 project:
710
711 · The Makefile Generators set this to make, gmake, or a generator-spe‐
712 cific tool (e.g. nmake for NMake Makefiles).
713
714 These generators store CMAKE_MAKE_PROGRAM in the CMake cache so that
715 it may be edited by the user.
716
717 · The Ninja generator sets this to ninja.
718
719 This generator stores CMAKE_MAKE_PROGRAM in the CMake cache so that
720 it may be edited by the user.
721
722 · The Xcode generator sets this to xcodebuild.
723
724 This generator prefers to lookup the build tool at build time rather
725 than to store CMAKE_MAKE_PROGRAM in the CMake cache ahead of time.
726 This is because xcodebuild is easy to find.
727
728 For compatibility with versions of CMake prior to 3.2, if a user or
729 project explicitly adds CMAKE_MAKE_PROGRAM to the CMake cache then
730 CMake will use the specified value.
731
732 · The Visual Studio Generators set this to the full path to MSBuild.exe
733 (VS >= 10), devenv.com (VS 7,8,9), or VCExpress.exe (VS Express 8,9).
734 (See also variables CMAKE_VS_MSBUILD_COMMAND and CMAKE_VS_DEVENV_COM‐
735 MAND.
736
737 These generators prefer to lookup the build tool at build time rather
738 than to store CMAKE_MAKE_PROGRAM in the CMake cache ahead of time.
739 This is because the tools are version-specific and can be located
740 using the Windows Registry. It is also necessary because the proper
741 build tool may depend on the project content (e.g. the Intel Fortran
742 plugin to VS 10 and 11 requires devenv.com to build its .vfproj
743 project files even though MSBuild.exe is normally preferred to sup‐
744 port the CMAKE_GENERATOR_TOOLSET).
745
746 For compatibility with versions of CMake prior to 3.0, if a user or
747 project explicitly adds CMAKE_MAKE_PROGRAM to the CMake cache then
748 CMake will use the specified value if possible.
749
750 · The Green Hills MULTI generator sets this to the full path to
751 gbuild.exe(Windows) or gbuild(Linux) based upon the toolset being
752 used.
753
754 Once the generator has initialized a particular value for this vari‐
755 able, changing the value has undefined behavior.
756
757 The CMAKE_MAKE_PROGRAM variable is set for use by project code. The
758 value is also used by the cmake(1) --build and ctest(1)
759 --build-and-test tools to launch the native build process.
760
761 CMAKE_MATCH_COUNT
762 The number of matches with the last regular expression.
763
764 When a regular expression match is used, CMake fills in CMAKE_MATCH_<n>
765 variables with the match contents. The CMAKE_MATCH_COUNT variable
766 holds the number of match expressions when these are filled.
767
768 CMAKE_MATCH_<n>
769 Capture group <n> matched by the last regular expression, for groups 0
770 through 9. Group 0 is the entire match. Groups 1 through 9 are the
771 subexpressions captured by () syntax.
772
773 When a regular expression match is used, CMake fills in CMAKE_MATCH_<n>
774 variables with the match contents. The CMAKE_MATCH_COUNT variable
775 holds the number of match expressions when these are filled.
776
777 CMAKE_MINIMUM_REQUIRED_VERSION
778 The <min> version of CMake given to the most recent call to the
779 cmake_minimum_required(VERSION) command.
780
781 CMAKE_MINOR_VERSION
782 Second version number component of the CMAKE_VERSION variable.
783
784 CMAKE_NETRC
785 This variable is used to initialize the NETRC option for file(DOWNLOAD)
786 and file(UPLOAD) commands and the module ExternalProject. See those
787 commands for additional information.
788
789 The local option takes precedence over this variable.
790
791 CMAKE_NETRC_FILE
792 This variable is used to initialize the NETRC_FILE option for
793 file(DOWNLOAD) and file(UPLOAD) commands and the module ExternalPro‐
794 ject. See those commands for additional information.
795
796 The local option takes precedence over this variable.
797
798 CMAKE_PARENT_LIST_FILE
799 Full path to the CMake file that included the current one.
800
801 While processing a CMake file loaded by include() or find_package()
802 this variable contains the full path to the file including it. The top
803 of the include stack is always the CMakeLists.txt for the current
804 directory. See also CMAKE_CURRENT_LIST_FILE.
805
806 CMAKE_PATCH_VERSION
807 Third version number component of the CMAKE_VERSION variable.
808
809 CMAKE_PROJECT_DESCRIPTION
810 The description of the top level project.
811
812 This variable holds the description of the project as specified in the
813 top level CMakeLists.txt file by a project() command. In the event
814 that the top level CMakeLists.txt contains multiple project() calls,
815 the most recently called one from that top level CMakeLists.txt will
816 determine the value that CMAKE_PROJECT_DESCRIPTION contains. For exam‐
817 ple, consider the following top level CMakeLists.txt:
818
819 cmake_minimum_required(VERSION 3.0)
820 project(First DESCRIPTION "I am First")
821 project(Second DESCRIPTION "I am Second")
822 add_subdirectory(sub)
823 project(Third DESCRIPTION "I am Third")
824
825 And sub/CMakeLists.txt with the following contents:
826
827 project(SubProj DESCRIPTION "I am SubProj")
828 message("CMAKE_PROJECT_DESCRIPTION = ${CMAKE_PROJECT_DESCRIPTION}")
829
830 The most recently seen project() command from the top level CMake‐
831 Lists.txt would be project(Second ...), so this will print:
832
833 CMAKE_PROJECT_DESCRIPTION = I am Second
834
835 To obtain the description from the most recent call to project() in the
836 current directory scope or above, see the PROJECT_DESCRIPTION variable.
837
838 CMAKE_PROJECT_HOMEPAGE_URL
839 The homepage URL of the top level project.
840
841 This variable holds the homepage URL of the project as specified in the
842 top level CMakeLists.txt file by a project() command. In the event
843 that the top level CMakeLists.txt contains multiple project() calls,
844 the most recently called one from that top level CMakeLists.txt will
845 determine the value that CMAKE_PROJECT_HOMEPAGE_URL contains. For
846 example, consider the following top level CMakeLists.txt:
847
848 cmake_minimum_required(VERSION 3.0)
849 project(First HOMEPAGE_URL "http://first.example.com")
850 project(Second HOMEPAGE_URL "http://second.example.com")
851 add_subdirectory(sub)
852 project(Third HOMEPAGE_URL "http://third.example.com")
853
854 And sub/CMakeLists.txt with the following contents:
855
856 project(SubProj HOMEPAGE_URL "http://subproj.example.com")
857 message("CMAKE_PROJECT_HOMEPAGE_URL = ${CMAKE_PROJECT_HOMEPAGE_URL}")
858
859 The most recently seen project() command from the top level CMake‐
860 Lists.txt would be project(Second ...), so this will print:
861
862 CMAKE_PROJECT_HOMEPAGE_URL = http://second.example.com
863
864 To obtain the homepage URL from the most recent call to project() in
865 the current directory scope or above, see the PROJECT_HOMEPAGE_URL
866 variable.
867
868 CMAKE_PROJECT_NAME
869 The name of the top level project.
870
871 This variable holds the name of the project as specified in the top
872 level CMakeLists.txt file by a project() command. In the event that
873 the top level CMakeLists.txt contains multiple project() calls, the
874 most recently called one from that top level CMakeLists.txt will deter‐
875 mine the name that CMAKE_PROJECT_NAME contains. For example, consider
876 the following top level CMakeLists.txt:
877
878 cmake_minimum_required(VERSION 3.0)
879 project(First)
880 project(Second)
881 add_subdirectory(sub)
882 project(Third)
883
884 And sub/CMakeLists.txt with the following contents:
885
886 project(SubProj)
887 message("CMAKE_PROJECT_NAME = ${CMAKE_PROJECT_NAME}")
888
889 The most recently seen project() command from the top level CMake‐
890 Lists.txt would be project(Second), so this will print:
891
892 CMAKE_PROJECT_NAME = Second
893
894 To obtain the name from the most recent call to project() in the cur‐
895 rent directory scope or above, see the PROJECT_NAME variable.
896
897 CMAKE_PROJECT_VERSION
898 The version of the top level project.
899
900 This variable holds the version of the project as specified in the top
901 level CMakeLists.txt file by a project() command. In the event that
902 the top level CMakeLists.txt contains multiple project() calls, the
903 most recently called one from that top level CMakeLists.txt will deter‐
904 mine the value that CMAKE_PROJECT_VERSION contains. For example, con‐
905 sider the following top level CMakeLists.txt:
906
907 cmake_minimum_required(VERSION 3.0)
908 project(First VERSION 1.2.3)
909 project(Second VERSION 3.4.5)
910 add_subdirectory(sub)
911 project(Third VERSION 6.7.8)
912
913 And sub/CMakeLists.txt with the following contents:
914
915 project(SubProj VERSION 1)
916 message("CMAKE_PROJECT_VERSION = ${CMAKE_PROJECT_VERSION}")
917
918 The most recently seen project() command from the top level CMake‐
919 Lists.txt would be project(Second ...), so this will print:
920
921 CMAKE_PROJECT_VERSION = 3.4.5
922
923 To obtain the version from the most recent call to project() in the
924 current directory scope or above, see the PROJECT_VERSION variable.
925
926 CMAKE_PROJECT_VERSION_MAJOR
927 The major version of the top level project.
928
929 This variable holds the major version of the project as specified in
930 the top level CMakeLists.txt file by a project() command. Please see
931 CMAKE_PROJECT_VERSION documentation for the behavior when multiple
932 project() commands are used in the sources.
933
934 CMAKE_PROJECT_VERSION_MINOR
935 The minor version of the top level project.
936
937 This variable holds the minor version of the project as specified in
938 the top level CMakeLists.txt file by a project() command. Please see
939 CMAKE_PROJECT_VERSION documentation for the behavior when multiple
940 project() commands are used in the sources.
941
942 CMAKE_PROJECT_VERSION_PATCH
943 The patch version of the top level project.
944
945 This variable holds the patch version of the project as specified in
946 the top level CMakeLists.txt file by a project() command. Please see
947 CMAKE_PROJECT_VERSION documentation for the behavior when multiple
948 project() commands are used in the sources.
949
950 CMAKE_PROJECT_VERSION_TWEAK
951 The tweak version of the top level project.
952
953 This variable holds the tweak version of the project as specified in
954 the top level CMakeLists.txt file by a project() command. Please see
955 CMAKE_PROJECT_VERSION documentation for the behavior when multiple
956 project() commands are used in the sources.
957
958 CMAKE_RANLIB
959 Name of randomizing tool for static libraries.
960
961 This specifies name of the program that randomizes libraries on UNIX,
962 not used on Windows, but may be present.
963
964 CMAKE_ROOT
965 Install directory for running cmake.
966
967 This is the install root for the running CMake and the Modules direc‐
968 tory can be found here. This is commonly used in this format:
969 ${CMAKE_ROOT}/Modules
970
971 CMAKE_RULE_MESSAGES
972 Specify whether to report a message for each make rule.
973
974 If set in the cache it is used to initialize the value of the RULE_MES‐
975 SAGES property. Users may disable the option in their local build tree
976 to disable granular messages and report only as each target completes
977 in Makefile builds.
978
979 CMAKE_SCRIPT_MODE_FILE
980 Full path to the cmake(1) -P script file currently being processed.
981
982 When run in cmake(1) -P script mode, CMake sets this variable to the
983 full path of the script file. When run to configure a CMakeLists.txt
984 file, this variable is not set.
985
986 CMAKE_SHARED_LIBRARY_PREFIX
987 The prefix for shared libraries that you link to.
988
989 The prefix to use for the name of a shared library, lib on UNIX.
990
991 CMAKE_SHARED_LIBRARY_PREFIX_<LANG> overrides this for language <LANG>.
992
993 CMAKE_SHARED_LIBRARY_SUFFIX
994 The suffix for shared libraries that you link to.
995
996 The suffix to use for the end of a shared library filename, .dll on
997 Windows.
998
999 CMAKE_SHARED_LIBRARY_SUFFIX_<LANG> overrides this for language <LANG>.
1000
1001 CMAKE_SHARED_MODULE_PREFIX
1002 The prefix for loadable modules that you link to.
1003
1004 The prefix to use for the name of a loadable module on this platform.
1005
1006 CMAKE_SHARED_MODULE_PREFIX_<LANG> overrides this for language <LANG>.
1007
1008 CMAKE_SHARED_MODULE_SUFFIX
1009 The suffix for shared libraries that you link to.
1010
1011 The suffix to use for the end of a loadable module filename on this
1012 platform
1013
1014 CMAKE_SHARED_MODULE_SUFFIX_<LANG> overrides this for language <LANG>.
1015
1016 CMAKE_SIZEOF_VOID_P
1017 Size of a void pointer.
1018
1019 This is set to the size of a pointer on the target machine, and is
1020 determined by a try compile. If a 64-bit size is found, then the
1021 library search path is modified to look for 64-bit libraries first.
1022
1023 CMAKE_SKIP_INSTALL_RULES
1024 Whether to disable generation of installation rules.
1025
1026 If TRUE, CMake will neither generate installation rules nor will it
1027 generate cmake_install.cmake files. This variable is FALSE by default.
1028
1029 CMAKE_SKIP_RPATH
1030 If true, do not add run time path information.
1031
1032 If this is set to TRUE, then the rpath information is not added to com‐
1033 piled executables. The default is to add rpath information if the
1034 platform supports it. This allows for easy running from the build
1035 tree. To omit RPATH in the install step, but not the build step, use
1036 CMAKE_SKIP_INSTALL_RPATH instead.
1037
1038 CMAKE_SOURCE_DIR
1039 The path to the top level of the source tree.
1040
1041 This is the full path to the top level of the current CMake source
1042 tree. For an in-source build, this would be the same as
1043 CMAKE_BINARY_DIR.
1044
1045 When run in -P script mode, CMake sets the variables CMAKE_BINARY_DIR,
1046 CMAKE_SOURCE_DIR, CMAKE_CURRENT_BINARY_DIR and CMAKE_CURRENT_SOURCE_DIR
1047 to the current working directory.
1048
1049 CMAKE_STATIC_LIBRARY_PREFIX
1050 The prefix for static libraries that you link to.
1051
1052 The prefix to use for the name of a static library, lib on UNIX.
1053
1054 CMAKE_STATIC_LIBRARY_PREFIX_<LANG> overrides this for language <LANG>.
1055
1056 CMAKE_STATIC_LIBRARY_SUFFIX
1057 The suffix for static libraries that you link to.
1058
1059 The suffix to use for the end of a static library filename, .lib on
1060 Windows.
1061
1062 CMAKE_STATIC_LIBRARY_SUFFIX_<LANG> overrides this for language <LANG>.
1063
1064 CMAKE_Swift_MODULE_DIRECTORY
1065 Swift module output directory.
1066
1067 This variable is used to initialise the Swift_MODULE_DIRECTORY property
1068 on all the targets. See the target property for additional informa‐
1069 tion.
1070
1071 CMAKE_Swift_NUM_THREADS
1072 Number of threads for parallel compilation for Swift targets.
1073
1074 This variable controls the number of parallel jobs that the swift
1075 driver creates for building targets. If not specified, it will default
1076 to the number of logical CPUs on the host.
1077
1078 CMAKE_TOOLCHAIN_FILE
1079 Path to toolchain file supplied to cmake(1).
1080
1081 This variable is specified on the command line when cross-compiling
1082 with CMake. It is the path to a file which is read early in the CMake
1083 run and which specifies locations for compilers and toolchain utili‐
1084 ties, and other target platform and compiler related information.
1085
1086 CMAKE_TWEAK_VERSION
1087 Defined to 0 for compatibility with code written for older CMake ver‐
1088 sions that may have defined higher values.
1089
1090 NOTE:
1091 In CMake versions 2.8.2 through 2.8.12, this variable holds the
1092 fourth version number component of the CMAKE_VERSION variable.
1093
1094 CMAKE_VERBOSE_MAKEFILE
1095 Enable verbose output from Makefile builds.
1096
1097 This variable is a cache entry initialized (to FALSE) by the project()
1098 command. Users may enable the option in their local build tree to get
1099 more verbose output from Makefile builds and show each command line as
1100 it is launched.
1101
1102 CMAKE_VERSION
1103 The CMake version string as three non-negative integer components sepa‐
1104 rated by . and possibly followed by - and other information. The first
1105 two components represent the feature level and the third component rep‐
1106 resents either a bug-fix level or development date.
1107
1108 Release versions and release candidate versions of CMake use the for‐
1109 mat:
1110
1111 <major>.<minor>.<patch>[-rc<n>]
1112
1113 where the <patch> component is less than 20000000. Development ver‐
1114 sions of CMake use the format:
1115
1116 <major>.<minor>.<date>[-<id>]
1117
1118 where the <date> component is of format CCYYMMDD and <id> may contain
1119 arbitrary text. This represents development as of a particular date
1120 following the <major>.<minor> feature release.
1121
1122 Individual component values are also available in variables:
1123
1124 · CMAKE_MAJOR_VERSION
1125
1126 · CMAKE_MINOR_VERSION
1127
1128 · CMAKE_PATCH_VERSION
1129
1130 · CMAKE_TWEAK_VERSION
1131
1132 Use the if() command VERSION_LESS, VERSION_GREATER, VERSION_EQUAL, VER‐
1133 SION_LESS_EQUAL, or VERSION_GREATER_EQUAL operators to compare version
1134 string values against CMAKE_VERSION using a component-wise test. Ver‐
1135 sion component values may be 10 or larger so do not attempt to compare
1136 version strings as floating-point numbers.
1137
1138 NOTE:
1139 CMake versions 2.8.2 through 2.8.12 used three components for the
1140 feature level. Release versions represented the bug-fix level in a
1141 fourth component, i.e. <major>.<minor>.<patch>[.<tweak>][-rc<n>].
1142 Development versions represented the development date in the fourth
1143 component, i.e. <major>.<minor>.<patch>.<date>[-<id>].
1144
1145 CMake versions prior to 2.8.2 used three components for the feature
1146 level and had no bug-fix component. Release versions used an
1147 even-valued second component, i.e.
1148 <major>.<even-minor>.<patch>[-rc<n>]. Development versions used an
1149 odd-valued second component with the development date as the third
1150 component, i.e. <major>.<odd-minor>.<date>.
1151
1152 The CMAKE_VERSION variable is defined by CMake 2.6.3 and higher.
1153 Earlier versions defined only the individual component variables.
1154
1155 CMAKE_VS_DEVENV_COMMAND
1156 The generators for Visual Studio 9 2008 and above set this variable to
1157 the devenv.com command installed with the corresponding Visual Studio
1158 version. Note that this variable may be empty on Visual Studio Express
1159 editions because they do not provide this tool.
1160
1161 This variable is not defined by other generators even if devenv.com is
1162 installed on the computer.
1163
1164 The CMAKE_VS_MSBUILD_COMMAND is also provided for Visual Studio 10 2010
1165 and above. See also the CMAKE_MAKE_PROGRAM variable.
1166
1167 CMAKE_VS_MSBUILD_COMMAND
1168 The generators for Visual Studio 10 2010 and above set this variable to
1169 the MSBuild.exe command installed with the corresponding Visual Studio
1170 version.
1171
1172 This variable is not defined by other generators even if MSBuild.exe is
1173 installed on the computer.
1174
1175 The CMAKE_VS_DEVENV_COMMAND is also provided for the non-Express edi‐
1176 tions of Visual Studio. See also the CMAKE_MAKE_PROGRAM variable.
1177
1178 CMAKE_VS_NsightTegra_VERSION
1179 When using a Visual Studio generator with the CMAKE_SYSTEM_NAME vari‐
1180 able set to Android, this variable contains the version number of the
1181 installed NVIDIA Nsight Tegra Visual Studio Edition.
1182
1183 CMAKE_VS_PLATFORM_NAME
1184 Visual Studio target platform name used by the current generator.
1185
1186 VS 8 and above allow project files to specify a target platform. CMake
1187 provides the name of the chosen platform in this variable. See the
1188 CMAKE_GENERATOR_PLATFORM variable for details.
1189
1190 See also the CMAKE_VS_PLATFORM_NAME_DEFAULT variable.
1191
1192 CMAKE_VS_PLATFORM_NAME_DEFAULT
1193 Default for the Visual Studio target platform name for the current gen‐
1194 erator without considering the value of the CMAKE_GENERATOR_PLATFORM
1195 variable. For Visual Studio Generators for VS 2017 and below this is
1196 always Win32. For VS 2019 and above this is based on the host plat‐
1197 form.
1198
1199 See also the CMAKE_VS_PLATFORM_NAME variable.
1200
1201 CMAKE_VS_PLATFORM_TOOLSET
1202 Visual Studio Platform Toolset name.
1203
1204 VS 10 and above use MSBuild under the hood and support multiple com‐
1205 piler toolchains. CMake may specify a toolset explicitly, such as v110
1206 for VS 11 or Windows7.1SDK for 64-bit support in VS 10 Express. CMake
1207 provides the name of the chosen toolset in this variable.
1208
1209 See the CMAKE_GENERATOR_TOOLSET variable for details.
1210
1211 CMAKE_VS_PLATFORM_TOOLSET_CUDA
1212 NVIDIA CUDA Toolkit version whose Visual Studio toolset to use.
1213
1214 The Visual Studio Generators for VS 2010 and above support using a CUDA
1215 toolset provided by a CUDA Toolkit. The toolset version number may be
1216 specified by a field in CMAKE_GENERATOR_TOOLSET of the form cuda=8.0.
1217 Or it is automatically detected if a path to a standalone CUDA direc‐
1218 tory is specified in the form cuda=C:\path\to\cuda. If none is speci‐
1219 fied CMake will choose a default version. CMake provides the selected
1220 CUDA toolset version in this variable. The value may be empty if no
1221 CUDA Toolkit with Visual Studio integration is installed.
1222
1223 CMAKE_VS_PLATFORM_TOOLSET_CUDA_CUSTOM_DIR
1224 Path to standalone NVIDIA CUDA Toolkit (eg. extracted from installer).
1225
1226 The Visual Studio Generators for VS 2010 and above support using a
1227 standalone (non-installed) NVIDIA CUDA toolkit. The path may be speci‐
1228 fied by a field in CMAKE_GENERATOR_TOOLSET of the form
1229 cuda=C:\path\to\cuda. The given directory must at least contain a
1230 folder .\nvcc and must provide Visual Studio integration files in path
1231 .\CUDAVisualStudioIntegration\extras\ visual_studio_integra‐
1232 tion\MSBuildExtensions\. One can create a standalone CUDA toolkit
1233 directory by either opening a installer with 7zip or copying the files
1234 that are extracted by the running installer. The value may be empty if
1235 no path to a standalone CUDA Toolkit was specified.
1236
1237 CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE
1238 Visual Studio preferred tool architecture.
1239
1240 The Visual Studio Generators for VS 2013 and above support using either
1241 the 32-bit or 64-bit host toolchains by specifying a host=x86 or
1242 host=x64 value in the CMAKE_GENERATOR_TOOLSET option. CMake provides
1243 the selected toolchain architecture preference in this variable (x86,
1244 x64, or empty).
1245
1246 CMAKE_VS_PLATFORM_TOOLSET_VERSION
1247 Visual Studio Platform Toolset version.
1248
1249 The Visual Studio Generators for VS 2017 and above allow to select
1250 minor versions of the same toolset. The toolset version number may be
1251 specified by a field in CMAKE_GENERATOR_TOOLSET of the form ver‐
1252 sion=14.11. If none is specified CMake will choose a default toolset.
1253 The value may be empty if no minor version was selected and the default
1254 is used.
1255
1256 CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION
1257 Visual Studio Windows Target Platform Version.
1258
1259 When targeting Windows 10 and above Visual Studio 2015 and above sup‐
1260 port specification of a target Windows version to select a correspond‐
1261 ing SDK. The CMAKE_SYSTEM_VERSION variable may be set to specify a
1262 version. Otherwise CMake computes a default version based on the Win‐
1263 dows SDK versions available. The chosen Windows target version number
1264 is provided in CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION. If no Windows
1265 10 SDK is available this value will be empty.
1266
1267 One may set a CMAKE_WINDOWS_KITS_10_DIR environment variable to an
1268 absolute path to tell CMake to look for Windows 10 SDKs in a custom
1269 location. The specified directory is expected to contain
1270 Include/10.0.* directories.
1271
1272 CMAKE_XCODE_GENERATE_SCHEME
1273 If enabled, the Xcode generator will generate schema files. These are
1274 useful to invoke analyze, archive, build-for-testing and test actions
1275 from the command line.
1276
1277 This variable initializes the XCODE_GENERATE_SCHEME target property on
1278 all targets.
1279
1280 CMAKE_XCODE_PLATFORM_TOOLSET
1281 Xcode compiler selection.
1282
1283 Xcode supports selection of a compiler from one of the installed
1284 toolsets. CMake provides the name of the chosen toolset in this vari‐
1285 able, if any is explicitly selected (e.g. via the cmake(1) -T option).
1286
1287 <PROJECT-NAME>_BINARY_DIR
1288 Top level binary directory for the named project.
1289
1290 A variable is created with the name used in the project() command, and
1291 is the binary directory for the project. This can be useful when
1292 add_subdirectory() is used to connect several projects.
1293
1294 <PROJECT-NAME>_DESCRIPTION
1295 Value given to the DESCRIPTION option of the most recent call to the
1296 project() command with project name <PROJECT-NAME>, if any.
1297
1298 <PROJECT-NAME>_HOMEPAGE_URL
1299 Value given to the HOMEPAGE_URL option of the most recent call to the
1300 project() command with project name <PROJECT-NAME>, if any.
1301
1302 <PROJECT-NAME>_SOURCE_DIR
1303 Top level source directory for the named project.
1304
1305 A variable is created with the name used in the project() command, and
1306 is the source directory for the project. This can be useful when
1307 add_subdirectory() is used to connect several projects.
1308
1309 <PROJECT-NAME>_VERSION
1310 Value given to the VERSION option of the most recent call to the
1311 project() command with project name <PROJECT-NAME>, if any.
1312
1313 See also the component-wise version variables <PROJECT-NAME>_VER‐
1314 SION_MAJOR, <PROJECT-NAME>_VERSION_MINOR, <PROJECT-NAME>_VERSION_PATCH,
1315 and <PROJECT-NAME>_VERSION_TWEAK.
1316
1317 <PROJECT-NAME>_VERSION_MAJOR
1318 First version number component of the <PROJECT-NAME>_VERSION variable
1319 as set by the project() command.
1320
1321 <PROJECT-NAME>_VERSION_MINOR
1322 Second version number component of the <PROJECT-NAME>_VERSION variable
1323 as set by the project() command.
1324
1325 <PROJECT-NAME>_VERSION_PATCH
1326 Third version number component of the <PROJECT-NAME>_VERSION variable
1327 as set by the project() command.
1328
1329 <PROJECT-NAME>_VERSION_TWEAK
1330 Fourth version number component of the <PROJECT-NAME>_VERSION variable
1331 as set by the project() command.
1332
1333 PROJECT_BINARY_DIR
1334 Full path to build directory for project.
1335
1336 This is the binary directory of the most recent project() command.
1337
1338 PROJECT_DESCRIPTION
1339 Short project description given to the project command.
1340
1341 This is the description given to the most recently called project()
1342 command in the current directory scope or above. To obtain the
1343 description of the top level project, see the CMAKE_PROJECT_DESCRIPTION
1344 variable.
1345
1346 PROJECT_HOMEPAGE_URL
1347 The homepage URL of the project.
1348
1349 This is the homepage URL given to the most recently called project()
1350 command in the current directory scope or above. To obtain the home‐
1351 page URL of the top level project, see the CMAKE_PROJECT_HOMEPAGE_URL
1352 variable.
1353
1354 PROJECT_NAME
1355 Name of the project given to the project command.
1356
1357 This is the name given to the most recently called project() command in
1358 the current directory scope or above. To obtain the name of the top
1359 level project, see the CMAKE_PROJECT_NAME variable.
1360
1361 PROJECT_SOURCE_DIR
1362 Top level source directory for the current project.
1363
1364 This is the source directory of the most recent project() command.
1365
1366 PROJECT_VERSION
1367 Value given to the VERSION option of the most recent call to the
1368 project() command, if any.
1369
1370 See also the component-wise version variables PROJECT_VERSION_MAJOR,
1371 PROJECT_VERSION_MINOR, PROJECT_VERSION_PATCH, and PROJECT_VER‐
1372 SION_TWEAK.
1373
1374 PROJECT_VERSION_MAJOR
1375 First version number component of the PROJECT_VERSION variable as set
1376 by the project() command.
1377
1378 PROJECT_VERSION_MINOR
1379 Second version number component of the PROJECT_VERSION variable as set
1380 by the project() command.
1381
1382 PROJECT_VERSION_PATCH
1383 Third version number component of the PROJECT_VERSION variable as set
1384 by the project() command.
1385
1386 PROJECT_VERSION_TWEAK
1387 Fourth version number component of the PROJECT_VERSION variable as set
1388 by the project() command.
1389
1391 BUILD_SHARED_LIBS
1392 Global flag to cause add_library() to create shared libraries if on.
1393
1394 If present and true, this will cause all libraries to be built shared
1395 unless the library was explicitly added as a static library. This
1396 variable is often added to projects as an option() so that each user of
1397 a project can decide if they want to build the project using shared or
1398 static libraries.
1399
1400 CMAKE_ABSOLUTE_DESTINATION_FILES
1401 List of files which have been installed using an ABSOLUTE DESTINATION
1402 path.
1403
1404 This variable is defined by CMake-generated cmake_install.cmake
1405 scripts. It can be used (read-only) by programs or scripts that source
1406 those install scripts. This is used by some CPack generators (e.g.
1407 RPM).
1408
1409 CMAKE_APPBUNDLE_PATH
1410 Semicolon-separated list of directories specifying a search path for
1411 macOS application bundles used by the find_program(), and find_pack‐
1412 age() commands.
1413
1414 CMAKE_AUTOMOC_RELAXED_MODE
1415 Deprecated since version 3.15.
1416
1417
1418 Switch between strict and relaxed automoc mode.
1419
1420 By default, AUTOMOC behaves exactly as described in the documentation
1421 of the AUTOMOC target property. When set to TRUE, it accepts more
1422 input and tries to find the correct input file for moc even if it dif‐
1423 fers from the documented behaviour. In this mode it e.g. also checks
1424 whether a header file is intended to be processed by moc when a
1425 "foo.moc" file has been included.
1426
1427 Relaxed mode has to be enabled for KDE4 compatibility.
1428
1429 CMAKE_BACKWARDS_COMPATIBILITY
1430 Deprecated. See CMake Policy CMP0001 documentation.
1431
1432 CMAKE_BUILD_TYPE
1433 Specifies the build type on single-configuration generators.
1434
1435 This statically specifies what build type (configuration) will be built
1436 in this build tree. Possible values are empty, Debug, Release, Rel‐
1437 WithDebInfo, MinSizeRel, … This variable is only meaningful to sin‐
1438 gle-configuration generators (such as Makefile Generators and Ninja)
1439 i.e. those which choose a single configuration when CMake runs to gen‐
1440 erate a build tree as opposed to multi-configuration generators which
1441 offer selection of the build configuration within the generated build
1442 environment. There are many per-config properties and variables (usu‐
1443 ally following clean SOME_VAR_<CONFIG> order conventions), such as
1444 CMAKE_C_FLAGS_<CONFIG>, specified as uppercase:
1445 CMAKE_C_FLAGS_[DEBUG|RELEASE|RELWITHDEBINFO|MINSIZEREL|...]. For exam‐
1446 ple, in a build tree configured to build type Debug, CMake will see to
1447 having CMAKE_C_FLAGS_DEBUG settings get added to the CMAKE_C_FLAGS set‐
1448 tings. See also CMAKE_CONFIGURATION_TYPES.
1449
1450 CMAKE_CODEBLOCKS_COMPILER_ID
1451 Change the compiler id in the generated CodeBlocks project files.
1452
1453 CodeBlocks uses its own compiler id string which differs from
1454 CMAKE_<LANG>_COMPILER_ID. If this variable is left empty, CMake tries
1455 to recognize the CodeBlocks compiler id automatically. Otherwise the
1456 specified string is used in the CodeBlocks project file. See the Code‐
1457 Blocks documentation for valid compiler id strings.
1458
1459 Other IDEs like QtCreator that also use the CodeBlocks generator may
1460 ignore this setting.
1461
1462 CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES
1463 Change the way the CodeBlocks generator creates project files.
1464
1465 If this variable evaluates to ON the generator excludes from the
1466 project file any files that are located outside the project root.
1467
1468 CMAKE_CODELITE_USE_TARGETS
1469 Change the way the CodeLite generator creates projectfiles.
1470
1471 If this variable evaluates to ON at the end of the top-level CMake‐
1472 Lists.txt file, the generator creates projectfiles based on targets
1473 rather than projects.
1474
1475 CMAKE_COLOR_MAKEFILE
1476 Enables color output when using the Makefile Generators.
1477
1478 When enabled, the generated Makefiles will produce colored output.
1479 Default is ON.
1480
1481 CMAKE_CONFIGURATION_TYPES
1482 Specifies the available build types on multi-config generators.
1483
1484 This specifies what build types (configurations) will be available such
1485 as Debug, Release, RelWithDebInfo etc. This has reasonable defaults on
1486 most platforms, but can be extended to provide other build types. See
1487 also CMAKE_BUILD_TYPE for details of managing configuration data, and
1488 CMAKE_CFG_INTDIR.
1489
1490 CMAKE_DEPENDS_IN_PROJECT_ONLY
1491 When set to TRUE in a directory, the build system produced by the Make‐
1492 file Generators is set up to only consider dependencies on source files
1493 that appear either in the source or in the binary directories. Changes
1494 to source files outside of these directories will not cause rebuilds.
1495
1496 This should be used carefully in cases where some source files are
1497 picked up through external headers during the build.
1498
1499 CMAKE_DISABLE_FIND_PACKAGE_<PackageName>
1500 Variable for disabling find_package() calls.
1501
1502 Every non-REQUIRED find_package() call in a project can be disabled by
1503 setting the variable CMAKE_DISABLE_FIND_PACKAGE_<PackageName> to TRUE.
1504 This can be used to build a project without an optional package,
1505 although that package is installed.
1506
1507 This switch should be used during the initial CMake run. Otherwise if
1508 the package has already been found in a previous CMake run, the vari‐
1509 ables which have been stored in the cache will still be there. In that
1510 case it is recommended to remove the cache variables for this package
1511 from the cache using the cache editor or cmake(1) -U
1512
1513 CMAKE_ECLIPSE_GENERATE_LINKED_RESOURCES
1514 This cache variable is used by the Eclipse project generator. See
1515 cmake-generators(7).
1516
1517 The Eclipse project generator generates so-called linked resources e.g.
1518 to the subproject root dirs in the source tree or to the source files
1519 of targets. This can be disabled by setting this variable to FALSE.
1520
1521 CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT
1522 This cache variable is used by the Eclipse project generator. See
1523 cmake-generators(7).
1524
1525 If this variable is set to TRUE, the Eclipse project generator will
1526 generate an Eclipse project in CMAKE_SOURCE_DIR . This project can then
1527 be used in Eclipse e.g. for the version control functionality.
1528 CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT defaults to FALSE; so nothing is
1529 written into the source directory.
1530
1531 CMAKE_ECLIPSE_MAKE_ARGUMENTS
1532 This cache variable is used by the Eclipse project generator. See
1533 cmake-generators(7).
1534
1535 This variable holds arguments which are used when Eclipse invokes the
1536 make tool. By default it is initialized to hold flags to enable paral‐
1537 lel builds (using -j typically).
1538
1539 CMAKE_ECLIPSE_RESOURCE_ENCODING
1540 This cache variable tells the Eclipse CDT4 project generator to set the
1541 resource encoding to the given value in generated project files. If no
1542 value is given, no encoding will be set.
1543
1544 CMAKE_ECLIPSE_VERSION
1545 This cache variable is used by the Eclipse project generator. See
1546 cmake-generators(7).
1547
1548 When using the Eclipse project generator, CMake tries to find the
1549 Eclipse executable and detect the version of it. Depending on the ver‐
1550 sion it finds, some features are enabled or disabled. If CMake doesn’t
1551 find Eclipse, it assumes the oldest supported version, Eclipse Callisto
1552 (3.2).
1553
1554 CMAKE_ERROR_DEPRECATED
1555 Whether to issue errors for deprecated functionality.
1556
1557 If TRUE, use of deprecated functionality will issue fatal errors. If
1558 this variable is not set, CMake behaves as if it were set to FALSE.
1559
1560 CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION
1561 Ask cmake_install.cmake script to error out as soon as a file with
1562 absolute INSTALL DESTINATION is encountered.
1563
1564 The fatal error is emitted before the installation of the offending
1565 file takes place. This variable is used by CMake-generated
1566 cmake_install.cmake scripts. If one sets this variable to ON while
1567 running the script, it may get fatal error messages from the script.
1568
1569 CMAKE_EXECUTE_PROCESS_COMMAND_ECHO
1570 If this variable is set to STDERR, STDOUT or NONE then commands in exe‐
1571 cute_process() calls will be printed to either stderr or stdout or not
1572 at all.
1573
1574 CMAKE_EXPORT_COMPILE_COMMANDS
1575 Enable/Disable output of compile commands during generation.
1576
1577 If enabled, generates a compile_commands.json file containing the exact
1578 compiler calls for all translation units of the project in
1579 machine-readable form. The format of the JSON file looks like:
1580
1581 [
1582 {
1583 "directory": "/home/user/development/project",
1584 "command": "/usr/bin/c++ ... -c ../foo/foo.cc",
1585 "file": "../foo/foo.cc"
1586 },
1587
1588 ...
1589
1590 {
1591 "directory": "/home/user/development/project",
1592 "command": "/usr/bin/c++ ... -c ../foo/bar.cc",
1593 "file": "../foo/bar.cc"
1594 }
1595 ]
1596
1597 This is initialized by the CMAKE_EXPORT_COMPILE_COMMANDS environment
1598 variable.
1599
1600 NOTE:
1601 This option is implemented only by Makefile Generators and the
1602 Ninja. It is ignored on other generators.
1603
1604 This option currently does not work well in combination with the
1605 UNITY_BUILD target property or the CMAKE_UNITY_BUILD variable.
1606
1607 CMAKE_EXPORT_PACKAGE_REGISTRY
1608 Enables the export(PACKAGE) command when CMP0090 is set to NEW.
1609
1610 The export(PACKAGE) command does nothing by default. In some cases it
1611 is desirable to write to the user package registry, so the
1612 CMAKE_EXPORT_PACKAGE_REGISTRY variable may be set to enable it.
1613
1614 If CMP0090 is not set to NEW this variable does nothing, and the
1615 CMAKE_EXPORT_NO_PACKAGE_REGISTRY variable controls the behavior
1616 instead.
1617
1618 See also Disabling the Package Registry.
1619
1620 CMAKE_EXPORT_NO_PACKAGE_REGISTRY
1621 Disable the export(PACKAGE) command when CMP0090 is not set to NEW.
1622
1623 In some cases, for example for packaging and for system wide installa‐
1624 tions, it is not desirable to write the user package registry. If the
1625 CMAKE_EXPORT_NO_PACKAGE_REGISTRY variable is enabled, the export(PACK‐
1626 AGE) command will do nothing.
1627
1628 If CMP0090 is set to NEW this variable does nothing, and the
1629 CMAKE_EXPORT_PACKAGE_REGISTRY variable controls the behavior instead.
1630
1631 See also Disabling the Package Registry.
1632
1633 CMAKE_FIND_APPBUNDLE
1634 This variable affects how find_* commands choose between macOS Applica‐
1635 tion Bundles and unix-style package components.
1636
1637 On Darwin or systems supporting macOS Application Bundles, the
1638 CMAKE_FIND_APPBUNDLE variable can be set to empty or one of the follow‐
1639 ing:
1640
1641 FIRST Try to find application bundles before standard programs. This
1642 is the default on Darwin.
1643
1644 LAST Try to find application bundles after standard programs.
1645
1646 ONLY Only try to find application bundles.
1647
1648 NEVER Never try to find application bundles.
1649
1650 CMAKE_FIND_FRAMEWORK
1651 This variable affects how find_* commands choose between macOS Frame‐
1652 works and unix-style package components.
1653
1654 On Darwin or systems supporting macOS Frameworks, the CMAKE_FIND_FRAME‐
1655 WORK variable can be set to empty or one of the following:
1656
1657 FIRST Try to find frameworks before standard libraries or headers.
1658 This is the default on Darwin.
1659
1660 LAST Try to find frameworks after standard libraries or headers.
1661
1662 ONLY Only try to find frameworks.
1663
1664 NEVER Never try to find frameworks.
1665
1666 CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX
1667 Specify a <suffix> to tell the find_library() command to search in a
1668 lib<suffix> directory before each lib directory that would normally be
1669 searched.
1670
1671 This overrides the behavior of related global properties:
1672
1673 · FIND_LIBRARY_USE_LIB32_PATHS
1674
1675 · FIND_LIBRARY_USE_LIB64_PATHS
1676
1677 · FIND_LIBRARY_USE_LIBX32_PATHS
1678
1679 CMAKE_FIND_LIBRARY_PREFIXES
1680 Prefixes to prepend when looking for libraries.
1681
1682 This specifies what prefixes to add to library names when the
1683 find_library() command looks for libraries. On UNIX systems this is
1684 typically lib, meaning that when trying to find the foo library it will
1685 look for libfoo.
1686
1687 CMAKE_FIND_LIBRARY_SUFFIXES
1688 Suffixes to append when looking for libraries.
1689
1690 This specifies what suffixes to add to library names when the
1691 find_library() command looks for libraries. On Windows systems this is
1692 typically .lib and .dll, meaning that when trying to find the foo
1693 library it will look for foo.dll etc.
1694
1695 CMAKE_FIND_NO_INSTALL_PREFIX
1696 Exclude the values of the CMAKE_INSTALL_PREFIX and CMAKE_STAGING_PREFIX
1697 variables from CMAKE_SYSTEM_PREFIX_PATH. CMake adds these project-des‐
1698 tination prefixes to CMAKE_SYSTEM_PREFIX_PATH by default in order to
1699 support building a series of dependent packages and installing them
1700 into a common prefix. Set CMAKE_FIND_NO_INSTALL_PREFIX to TRUE to sup‐
1701 press this behavior.
1702
1703 The CMAKE_SYSTEM_PREFIX_PATH is initialized on the first call to a
1704 project() or enable_language() command. Therefore one must set
1705 CMAKE_FIND_NO_INSTALL_PREFIX before this in order to take effect. A
1706 user may set the variable as a cache entry on the command line to
1707 achieve this.
1708
1709 Note that the prefix(es) may still be searched for other reasons, such
1710 as being the same prefix as the CMake installation, or for being a
1711 built-in system prefix.
1712
1713 CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY
1714 Deprecated since version 3.16: Use the CMAKE_FIND_USE_PACKAGE_REGISTRY
1715 variable instead.
1716
1717
1718 By default this variable is not set. If neither CMAKE_FIND_USE_PACK‐
1719 AGE_REGISTRY nor CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY is set, then
1720 find_package() will use the User Package Registry unless the
1721 NO_CMAKE_PACKAGE_REGISTRY option is provided.
1722
1723 CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY is ignored if
1724 CMAKE_FIND_USE_PACKAGE_REGISTRY is set.
1725
1726 In some cases, for example to locate only system wide installations, it
1727 is not desirable to use the User Package Registry when searching for
1728 packages. If the CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY variable is
1729 TRUE, all the find_package() commands will skip the User Package Reg‐
1730 istry as if they were called with the NO_CMAKE_PACKAGE_REGISTRY argu‐
1731 ment.
1732
1733 See also Disabling the Package Registry.
1734
1735 CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY
1736 Deprecated since version 3.16: Use the CMAKE_FIND_USE_SYSTEM_PACK‐
1737 AGE_REGISTRY variable instead.
1738
1739
1740 By default this variable is not set. If neither CMAKE_FIND_USE_SYS‐
1741 TEM_PACKAGE_REGISTRY nor CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY
1742 is set, then find_package() will use the System Package Registry unless
1743 the NO_CMAKE_SYSTEM_PACKAGE_REGISTRY option is provided.
1744
1745 CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY is ignored if
1746 CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY is set.
1747
1748 In some cases, it is not desirable to use the System Package Registry
1749 when searching for packages. If the
1750 CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY variable is TRUE, all the
1751 find_package() commands will skip the System Package Registry as if
1752 they were called with the NO_CMAKE_SYSTEM_PACKAGE_REGISTRY argument.
1753
1754 See also Disabling the Package Registry.
1755
1756 CMAKE_FIND_PACKAGE_PREFER_CONFIG
1757 Tell find_package() to try “Config” mode before “Module” mode if no
1758 mode was specified.
1759
1760 The command find_package() operates without an explicit mode when the
1761 reduced signature is used without the MODULE option. In this case, by
1762 default, CMake first tries Module mode by searching for a
1763 Find<pkg>.cmake module. If it fails, CMake then searches for the pack‐
1764 age using Config mode.
1765
1766 Set CMAKE_FIND_PACKAGE_PREFER_CONFIG to TRUE to tell find_package() to
1767 first search using Config mode before falling back to Module mode.
1768
1769 This variable may be useful when a developer has compiled a custom ver‐
1770 sion of a common library and wishes to link it to a dependent project.
1771 If this variable is set to TRUE, it would prevent a dependent project’s
1772 call to find_package() from selecting the default library located by
1773 the system’s Find<pkg>.cmake module before finding the developer’s cus‐
1774 tom built library.
1775
1776 Once this variable is set, it is the responsibility of the exported
1777 <pkg>Config.cmake files to provide the same result variables as the
1778 Find<pkg>.cmake modules so that dependent projects can use them inter‐
1779 changeably.
1780
1781 CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS
1782 Set to TRUE to tell find_package() calls to resolve symbolic links in
1783 the value of <PackageName>_DIR.
1784
1785 This is helpful in use cases where the package search path points at a
1786 proxy directory in which symlinks to the real package locations appear.
1787 This is not enabled by default because there are also common use cases
1788 in which the symlinks should be preserved.
1789
1790 CMAKE_FIND_PACKAGE_WARN_NO_MODULE
1791 Tell find_package() to warn if called without an explicit mode.
1792
1793 If find_package() is called without an explicit mode option (MODULE,
1794 CONFIG, or NO_MODULE) and no Find<pkg>.cmake module is in CMAKE_MOD‐
1795 ULE_PATH then CMake implicitly assumes that the caller intends to
1796 search for a package configuration file. If no package configuration
1797 file is found then the wording of the failure message must account for
1798 both the case that the package is really missing and the case that the
1799 project has a bug and failed to provide the intended Find module. If
1800 instead the caller specifies an explicit mode option then the failure
1801 message can be more specific.
1802
1803 Set CMAKE_FIND_PACKAGE_WARN_NO_MODULE to TRUE to tell find_package() to
1804 warn when it implicitly assumes Config mode. This helps developers
1805 enforce use of an explicit mode in all calls to find_package() within a
1806 project.
1807
1808 This variable has no effect if CMAKE_FIND_PACKAGE_PREFER_CONFIG is set
1809 to TRUE.
1810
1811 CMAKE_FIND_ROOT_PATH
1812 Semicolon-separated list of root paths to search on the filesystem.
1813
1814 This variable is most useful when cross-compiling. CMake uses the paths
1815 in this list as alternative roots to find filesystem items with
1816 find_package(), find_library() etc.
1817
1818 CMAKE_FIND_ROOT_PATH_MODE_INCLUDE
1819 This variable controls whether the CMAKE_FIND_ROOT_PATH and CMAKE_SYS‐
1820 ROOT are used by find_file() and find_path().
1821
1822 If set to ONLY, then only the roots in CMAKE_FIND_ROOT_PATH will be
1823 searched. If set to NEVER, then the roots in CMAKE_FIND_ROOT_PATH will
1824 be ignored and only the host system root will be used. If set to BOTH,
1825 then the host system paths and the paths in CMAKE_FIND_ROOT_PATH will
1826 be searched.
1827
1828 CMAKE_FIND_ROOT_PATH_MODE_LIBRARY
1829 This variable controls whether the CMAKE_FIND_ROOT_PATH and CMAKE_SYS‐
1830 ROOT are used by find_library().
1831
1832 If set to ONLY, then only the roots in CMAKE_FIND_ROOT_PATH will be
1833 searched. If set to NEVER, then the roots in CMAKE_FIND_ROOT_PATH will
1834 be ignored and only the host system root will be used. If set to BOTH,
1835 then the host system paths and the paths in CMAKE_FIND_ROOT_PATH will
1836 be searched.
1837
1838 CMAKE_FIND_ROOT_PATH_MODE_PACKAGE
1839 This variable controls whether the CMAKE_FIND_ROOT_PATH and CMAKE_SYS‐
1840 ROOT are used by find_package().
1841
1842 If set to ONLY, then only the roots in CMAKE_FIND_ROOT_PATH will be
1843 searched. If set to NEVER, then the roots in CMAKE_FIND_ROOT_PATH will
1844 be ignored and only the host system root will be used. If set to BOTH,
1845 then the host system paths and the paths in CMAKE_FIND_ROOT_PATH will
1846 be searched.
1847
1848 CMAKE_FIND_ROOT_PATH_MODE_PROGRAM
1849 This variable controls whether the CMAKE_FIND_ROOT_PATH and CMAKE_SYS‐
1850 ROOT are used by find_program().
1851
1852 If set to ONLY, then only the roots in CMAKE_FIND_ROOT_PATH will be
1853 searched. If set to NEVER, then the roots in CMAKE_FIND_ROOT_PATH will
1854 be ignored and only the host system root will be used. If set to BOTH,
1855 then the host system paths and the paths in CMAKE_FIND_ROOT_PATH will
1856 be searched.
1857
1858 CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH
1859 Controls the default behavior of the following commands for whether or
1860 not to search paths provided by cmake-specific environment variables:
1861
1862 · find_program()
1863
1864 · find_library()
1865
1866 · find_file()
1867
1868 · find_path()
1869
1870 · find_package()
1871
1872 This is useful in cross-compiling environments.
1873
1874 By default this variable is not set, which is equivalent to it having a
1875 value of TRUE. Explicit options given to the above commands take
1876 precedence over this variable.
1877
1878 See also the CMAKE_FIND_USE_CMAKE_PATH, CMAKE_FIND_USE_CMAKE_SYS‐
1879 TEM_PATH, CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH, CMAKE_FIND_USE_SYS‐
1880 TEM_PACKAGE_REGISTRY, CMAKE_FIND_USE_PACKAGE_REGISTRY, and
1881 CMAKE_FIND_USE_PACKAGE_ROOT_PATH variables.
1882
1883 CMAKE_FIND_USE_CMAKE_PATH
1884 Controls the default behavior of the following commands for whether or
1885 not to search paths provided by cmake-specific cache variables:
1886
1887 · find_program()
1888
1889 · find_library()
1890
1891 · find_file()
1892
1893 · find_path()
1894
1895 · find_package()
1896
1897 This is useful in cross-compiling environments.
1898
1899 By default this variable is not set, which is equivalent to it having a
1900 value of TRUE. Explicit options given to the above commands take
1901 precedence over this variable.
1902
1903 See also the CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH,
1904 CMAKE_FIND_USE_CMAKE_SYSTEM_PATH, CMAKE_FIND_USE_SYSTEM_ENVIRON‐
1905 MENT_PATH, CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY, CMAKE_FIND_USE_PACK‐
1906 AGE_REGISTRY, and CMAKE_FIND_USE_PACKAGE_ROOT_PATH variables.
1907
1908 CMAKE_FIND_USE_CMAKE_SYSTEM_PATH
1909 Controls the default behavior of the following commands for whether or
1910 not to search paths provided by platform-specific cmake variables:
1911
1912 · find_program()
1913
1914 · find_library()
1915
1916 · find_file()
1917
1918 · find_path()
1919
1920 · find_package()
1921
1922 This is useful in cross-compiling environments.
1923
1924 By default this variable is not set, which is equivalent to it having a
1925 value of TRUE. Explicit options given to the above commands take
1926 precedence over this variable.
1927
1928 See also the CMAKE_FIND_USE_CMAKE_PATH, CMAKE_FIND_USE_CMAKE_ENVIRON‐
1929 MENT_PATH, CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH, CMAKE_FIND_USE_SYS‐
1930 TEM_PACKAGE_REGISTRY, CMAKE_FIND_USE_PACKAGE_REGISTRY, and
1931 CMAKE_FIND_USE_PACKAGE_ROOT_PATH variables.
1932
1933 CMAKE_FIND_USE_PACKAGE_REGISTRY
1934 Controls the default behavior of the find_package() command for whether
1935 or not to search paths provided by the User Package Registry.
1936
1937 By default this variable is not set and the behavior will fall back to
1938 that determined by the deprecated CMAKE_FIND_PACKAGE_NO_PACKAGE_REG‐
1939 ISTRY variable. If that is also not set, then find_package() will use
1940 the User Package Registry unless the NO_CMAKE_PACKAGE_REGISTRY option
1941 is provided.
1942
1943 This variable takes precedence over CMAKE_FIND_PACKAGE_NO_PACKAGE_REG‐
1944 ISTRY when both are set.
1945
1946 In some cases, for example to locate only system wide installations, it
1947 is not desirable to use the User Package Registry when searching for
1948 packages. If the CMAKE_FIND_USE_PACKAGE_REGISTRY variable is FALSE,
1949 all the find_package() commands will skip the User Package Registry as
1950 if they were called with the NO_CMAKE_PACKAGE_REGISTRY argument.
1951
1952 See also Disabling the Package Registry and the
1953 CMAKE_FIND_USE_CMAKE_PATH, CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH,
1954 CMAKE_FIND_USE_CMAKE_SYSTEM_PATH, CMAKE_FIND_USE_SYSTEM_ENVIRON‐
1955 MENT_PATH, CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY, and
1956 CMAKE_FIND_USE_PACKAGE_ROOT_PATH variables.
1957
1958 CMAKE_FIND_USE_PACKAGE_ROOT_PATH
1959 Controls the default behavior of the following commands for whether or
1960 not to search paths provided by <PackageName>_ROOT variables:
1961
1962 · find_program()
1963
1964 · find_library()
1965
1966 · find_file()
1967
1968 · find_path()
1969
1970 · find_package()
1971
1972 By default this variable is not set, which is equivalent to it having a
1973 value of TRUE. Explicit options given to the above commands take
1974 precedence over this variable.
1975
1976 See also the CMAKE_FIND_USE_CMAKE_PATH, CMAKE_FIND_USE_CMAKE_ENVIRON‐
1977 MENT_PATH, CMAKE_FIND_USE_CMAKE_SYSTEM_PATH, CMAKE_FIND_USE_SYS‐
1978 TEM_ENVIRONMENT_PATH, CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY, and
1979 CMAKE_FIND_USE_PACKAGE_REGISTRY variables.
1980
1981 CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH
1982 Controls the default behavior of the following commands for whether or
1983 not to search paths provided by standard system environment variables:
1984
1985 · find_program()
1986
1987 · find_library()
1988
1989 · find_file()
1990
1991 · find_path()
1992
1993 · find_package()
1994
1995 This is useful in cross-compiling environments.
1996
1997 By default this variable is not set, which is equivalent to it having a
1998 value of TRUE. Explicit options given to the above commands take
1999 precedence over this variable.
2000
2001 See also the CMAKE_FIND_USE_CMAKE_PATH, CMAKE_FIND_USE_CMAKE_ENVIRON‐
2002 MENT_PATH, CMAKE_FIND_USE_CMAKE_SYSTEM_PATH, CMAKE_FIND_USE_PACK‐
2003 AGE_REGISTRY, CMAKE_FIND_USE_PACKAGE_ROOT_PATH, and CMAKE_FIND_USE_SYS‐
2004 TEM_PACKAGE_REGISTRY variables.
2005
2006 CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY
2007 Controls searching the System Package Registry by the find_package()
2008 command.
2009
2010 By default this variable is not set and the behavior will fall back to
2011 that determined by the deprecated CMAKE_FIND_PACKAGE_NO_SYSTEM_PACK‐
2012 AGE_REGISTRY variable. If that is also not set, then find_package()
2013 will use the System Package Registry unless the NO_CMAKE_SYSTEM_PACK‐
2014 AGE_REGISTRY option is provided.
2015
2016 This variable takes precedence over CMAKE_FIND_PACKAGE_NO_SYSTEM_PACK‐
2017 AGE_REGISTRY when both are set.
2018
2019 In some cases, for example to locate only user specific installations,
2020 it is not desirable to use the System Package Registry when searching
2021 for packages. If the CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY variable is
2022 FALSE, all the find_package() commands will skip the System Package
2023 Registry as if they were called with the NO_CMAKE_SYSTEM_PACKAGE_REG‐
2024 ISTRY argument.
2025
2026 See also Disabling the Package Registry.
2027
2028 See also the CMAKE_FIND_USE_CMAKE_PATH, CMAKE_FIND_USE_CMAKE_ENVIRON‐
2029 MENT_PATH, CMAKE_FIND_USE_CMAKE_SYSTEM_PATH, CMAKE_FIND_USE_SYS‐
2030 TEM_ENVIRONMENT_PATH, CMAKE_FIND_USE_PACKAGE_REGISTRY, and
2031 CMAKE_FIND_USE_PACKAGE_ROOT_PATH variables.
2032
2033 CMAKE_FRAMEWORK_PATH
2034 Semicolon-separated list of directories specifying a search path for
2035 macOS frameworks used by the find_library(), find_package(),
2036 find_path(), and find_file() commands.
2037
2038 CMAKE_IGNORE_PATH
2039 Semicolon-separated list of directories to be ignored by the find_pro‐
2040 gram(), find_library(), find_file(), and find_path() commands. This is
2041 useful in cross-compiling environments where some system directories
2042 contain incompatible but possibly linkable libraries. For example, on
2043 cross-compiled cluster environments, this allows a user to ignore
2044 directories containing libraries meant for the front-end machine.
2045
2046 By default this is empty; it is intended to be set by the project.
2047 Note that CMAKE_IGNORE_PATH takes a list of directory names, not a list
2048 of prefixes. To ignore paths under prefixes (bin, include, lib, etc.),
2049 specify them explicitly.
2050
2051 See also the CMAKE_PREFIX_PATH, CMAKE_LIBRARY_PATH, CMAKE_INCLUDE_PATH,
2052 and CMAKE_PROGRAM_PATH variables.
2053
2054 CMAKE_INCLUDE_DIRECTORIES_BEFORE
2055 Whether to append or prepend directories by default in include_directo‐
2056 ries().
2057
2058 This variable affects the default behavior of the include_directories()
2059 command. Setting this variable to ON is equivalent to using the BEFORE
2060 option in all uses of that command.
2061
2062 CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE
2063 Whether to force prepending of project include directories.
2064
2065 This variable affects the order of include directories generated in
2066 compiler command lines. If set to ON, it causes the CMAKE_SOURCE_DIR
2067 and the CMAKE_BINARY_DIR to appear first.
2068
2069 CMAKE_INCLUDE_PATH
2070 Semicolon-separated list of directories specifying a search path for
2071 the find_file() and find_path() commands. By default it is empty, it
2072 is intended to be set by the project. See also CMAKE_SYS‐
2073 TEM_INCLUDE_PATH and CMAKE_PREFIX_PATH.
2074
2075 CMAKE_INSTALL_DEFAULT_COMPONENT_NAME
2076 Default component used in install() commands.
2077
2078 If an install() command is used without the COMPONENT argument, these
2079 files will be grouped into a default component. The name of this
2080 default install component will be taken from this variable. It
2081 defaults to Unspecified.
2082
2083 CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS
2084 Default permissions for directories created implicitly during installa‐
2085 tion of files by install() and file(INSTALL).
2086
2087 If make install is invoked and directories are implicitly created they
2088 get permissions set by CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS
2089 variable or platform specific default permissions if the variable is
2090 not set.
2091
2092 Implicitly created directories are created if they are not explicitly
2093 installed by install() command but are needed to install a file on a
2094 certain path. Example of such locations are directories created due to
2095 the setting of CMAKE_INSTALL_PREFIX.
2096
2097 Expected content of the CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS
2098 variable is a list of permissions that can be used by install() command
2099 PERMISSIONS section.
2100
2101 Example usage:
2102
2103 set(CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS
2104 OWNER_READ
2105 OWNER_WRITE
2106 OWNER_EXECUTE
2107 GROUP_READ
2108 )
2109
2110 CMAKE_INSTALL_MESSAGE
2111 Specify verbosity of installation script code generated by the
2112 install() command (using the file(INSTALL) command). For paths that
2113 are newly installed or updated, installation may print lines like:
2114
2115 -- Installing: /some/destination/path
2116
2117 For paths that are already up to date, installation may print lines
2118 like:
2119
2120 -- Up-to-date: /some/destination/path
2121
2122 The CMAKE_INSTALL_MESSAGE variable may be set to control which messages
2123 are printed:
2124
2125 ALWAYS Print both Installing and Up-to-date messages.
2126
2127 LAZY Print Installing but not Up-to-date messages.
2128
2129 NEVER Print neither Installing nor Up-to-date messages.
2130
2131 Other values have undefined behavior and may not be diagnosed.
2132
2133 If this variable is not set, the default behavior is ALWAYS.
2134
2135 CMAKE_INSTALL_PREFIX
2136 Install directory used by install().
2137
2138 If make install is invoked or INSTALL is built, this directory is
2139 prepended onto all install directories. This variable defaults to
2140 /usr/local on UNIX and c:/Program Files/${PROJECT_NAME} on Windows.
2141 See CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT for how a project might
2142 choose its own default.
2143
2144 On UNIX one can use the DESTDIR mechanism in order to relocate the
2145 whole installation. See DESTDIR for more information.
2146
2147 The installation prefix is also added to CMAKE_SYSTEM_PREFIX_PATH so
2148 that find_package(), find_program(), find_library(), find_path(), and
2149 find_file() will search the prefix for other software.
2150
2151 NOTE:
2152 Use the GNUInstallDirs module to provide GNU-style options for the
2153 layout of directories within the installation.
2154
2155 CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT
2156 CMake sets this variable to a TRUE value when the CMAKE_INSTALL_PREFIX
2157 has just been initialized to its default value, typically on the first
2158 run of CMake within a new build tree. This can be used by project code
2159 to change the default without overriding a user-provided value:
2160
2161 if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
2162 set(CMAKE_INSTALL_PREFIX "/my/default" CACHE PATH "..." FORCE)
2163 endif()
2164
2165 CMAKE_LIBRARY_PATH
2166 Semicolon-separated list of directories specifying a search path for
2167 the find_library() command. By default it is empty, it is intended to
2168 be set by the project. See also CMAKE_SYSTEM_LIBRARY_PATH and
2169 CMAKE_PREFIX_PATH.
2170
2171 CMAKE_LINK_DIRECTORIES_BEFORE
2172 Whether to append or prepend directories by default in link_directo‐
2173 ries().
2174
2175 This variable affects the default behavior of the link_directories()
2176 command. Setting this variable to ON is equivalent to using the BEFORE
2177 option in all uses of that command.
2178
2179 CMAKE_MFC_FLAG
2180 Use the MFC library for an executable or dll.
2181
2182 Enables the use of the Microsoft Foundation Classes (MFC). It should
2183 be set to 1 for the static MFC library, and 2 for the shared MFC
2184 library. This is used in Visual Studio project files.
2185
2186 Usage example:
2187
2188 add_definitions(-D_AFXDLL)
2189 set(CMAKE_MFC_FLAG 2)
2190 add_executable(CMakeSetup WIN32 ${SRCS})
2191
2192 CMAKE_MAXIMUM_RECURSION_DEPTH
2193 Maximum recursion depth for CMake scripts. It is intended to be set on
2194 the command line with -DCMAKE_MAXIMUM_RECURSION_DEPTH=<x>, or within
2195 CMakeLists.txt by projects that require a large recursion depth.
2196 Projects that set this variable should provide the user with a way to
2197 override it. For example:
2198
2199 # About to perform deeply recursive actions
2200 if(NOT CMAKE_MAXIMUM_RECURSION_DEPTH)
2201 set(CMAKE_MAXIMUM_RECURSION_DEPTH 2000)
2202 endif()
2203
2204 If it is not set, or is set to a non-integer value, a sensible default
2205 limit is used. If the recursion limit is reached, the script terminates
2206 immediately with a fatal error.
2207
2208 Calling any of the following commands increases the recursion depth:
2209
2210 · include()
2211
2212 · find_package()
2213
2214 · add_subdirectory()
2215
2216 · try_compile()
2217
2218 · ctest_read_custom_files()
2219
2220 · ctest_run_script() (unless NEW_PROCESS is specified)
2221
2222 · User-defined function()’s and macro()’s (note that function() and
2223 macro() themselves don’t increase recursion depth)
2224
2225 · Reading or writing variables that are being watched by a vari‐
2226 able_watch()
2227
2228 CMAKE_MESSAGE_CONTEXT
2229 When enabled by the cmake --log-context command line option or the
2230 CMAKE_MESSAGE_CONTEXT_SHOW variable, the message() command converts the
2231 CMAKE_MESSAGE_CONTEXT list into a dot-separated string surrounded by
2232 square brackets and prepends it to each line for messages of log levels
2233 NOTICE and below.
2234
2235 For logging contexts to work effectively, projects should generally
2236 APPEND and POP_BACK an item to the current value of CMAKE_MESSAGE_CON‐
2237 TEXT rather than replace it. Projects should not assume the message
2238 context at the top of the source tree is empty, as there are scenarios
2239 where the context might have already been set (e.g. hierarchical
2240 projects).
2241
2242 WARNING:
2243 Valid context names are restricted to anything that could be used as
2244 a CMake variable name. All names that begin with an underscore or
2245 the string cmake_ are also reserved for use by CMake and should not
2246 be used by projects.
2247
2248 Example:
2249
2250 function(bar)
2251 list(APPEND CMAKE_MESSAGE_CONTEXT "bar")
2252 message(VERBOSE "bar VERBOSE message")
2253 endfunction()
2254
2255 function(baz)
2256 list(APPEND CMAKE_MESSAGE_CONTEXT "baz")
2257 message(DEBUG "baz DEBUG message")
2258 endfunction()
2259
2260 function(foo)
2261 list(APPEND CMAKE_MESSAGE_CONTEXT "foo")
2262 bar()
2263 message(TRACE "foo TRACE message")
2264 baz()
2265 endfunction()
2266
2267 list(APPEND CMAKE_MESSAGE_CONTEXT "top")
2268
2269 message(VERBOSE "Before `foo`")
2270 foo()
2271 message(VERBOSE "After `foo`")
2272
2273 list(POP_BACK CMAKE_MESSAGE_CONTEXT)
2274
2275 Which results in the following output:
2276
2277 -- [top] Before `foo`
2278 -- [top.foo.bar] bar VERBOSE message
2279 -- [top.foo] foo TRACE message
2280 -- [top.foo.baz] baz DEBUG message
2281 -- [top] After `foo`
2282
2283 CMAKE_MESSAGE_CONTEXT_SHOW
2284 Setting this variable to true enables showing a context with each line
2285 logged by the message() command (see CMAKE_MESSAGE_CONTEXT for how the
2286 context itself is specified).
2287
2288 This variable is an alternative to providing the --log-context option
2289 on the cmake command line. Whereas the command line option will apply
2290 only to that one CMake run, setting CMAKE_MESSAGE_CONTEXT_SHOW to true
2291 as a cache variable will ensure that subsequent CMake runs will con‐
2292 tinue to show the message context.
2293
2294 Projects should not set CMAKE_MESSAGE_CONTEXT_SHOW. It is intended for
2295 users so that they may control whether or not to include context with
2296 messages.
2297
2298 CMAKE_MESSAGE_INDENT
2299 The message() command joins the strings from this list and for log lev‐
2300 els of NOTICE and below, it prepends the resultant string to each line
2301 of the message.
2302
2303 Example:
2304
2305 list(APPEND listVar one two three)
2306
2307 message(VERBOSE [[Collected items in the "listVar":]])
2308 list(APPEND CMAKE_MESSAGE_INDENT " ")
2309
2310 foreach(item IN LISTS listVar)
2311 message(VERBOSE ${item})
2312 endforeach()
2313
2314 list(POP_BACK CMAKE_MESSAGE_INDENT)
2315 message(VERBOSE "No more indent")
2316
2317 Which results in the following output:
2318
2319 -- Collected items in the "listVar":
2320 -- one
2321 -- two
2322 -- three
2323 -- No more indent
2324
2325 CMAKE_MESSAGE_LOG_LEVEL
2326 When set, this variable specifies the logging level used by the mes‐
2327 sage() command. Valid values are the same as those for the --log-level
2328 command line option of the cmake(1) program. If this variable is set
2329 and the --log-level command line option is given, the command line
2330 option takes precedence.
2331
2332 The main advantage to using this variable is to make a log level per‐
2333 sist between CMake runs. Setting it as a cache variable will ensure
2334 that subsequent CMake runs will continue to use the chosen log level.
2335
2336 Projects should not set this variable, it is intended for users so that
2337 they may control the log level according to their own needs.
2338
2339 CMAKE_MODULE_PATH
2340 Semicolon-separated list of directories specifying a search path for
2341 CMake modules to be loaded by the include() or find_package() commands
2342 before checking the default modules that come with CMake. By default
2343 it is empty, it is intended to be set by the project.
2344
2345 CMAKE_POLICY_DEFAULT_CMP<NNNN>
2346 Default for CMake Policy CMP<NNNN> when it is otherwise left unset.
2347
2348 Commands cmake_minimum_required(VERSION) and cmake_policy(VERSION) by
2349 default leave policies introduced after the given version unset. Set
2350 CMAKE_POLICY_DEFAULT_CMP<NNNN> to OLD or NEW to specify the default for
2351 policy CMP<NNNN>, where <NNNN> is the policy number.
2352
2353 This variable should not be set by a project in CMake code; use
2354 cmake_policy(SET) instead. Users running CMake may set this variable
2355 in the cache (e.g. -DCMAKE_POLICY_DEFAULT_CMP<NNNN>=<OLD|NEW>) to set a
2356 policy not otherwise set by the project. Set to OLD to quiet a policy
2357 warning while using old behavior or to NEW to try building the project
2358 with new behavior.
2359
2360 CMAKE_POLICY_WARNING_CMP<NNNN>
2361 Explicitly enable or disable the warning when CMake Policy CMP<NNNN> is
2362 not set. This is meaningful only for the few policies that do not warn
2363 by default:
2364
2365 · CMAKE_POLICY_WARNING_CMP0025 controls the warning for policy CMP0025.
2366
2367 · CMAKE_POLICY_WARNING_CMP0047 controls the warning for policy CMP0047.
2368
2369 · CMAKE_POLICY_WARNING_CMP0056 controls the warning for policy CMP0056.
2370
2371 · CMAKE_POLICY_WARNING_CMP0060 controls the warning for policy CMP0060.
2372
2373 · CMAKE_POLICY_WARNING_CMP0065 controls the warning for policy CMP0065.
2374
2375 · CMAKE_POLICY_WARNING_CMP0066 controls the warning for policy CMP0066.
2376
2377 · CMAKE_POLICY_WARNING_CMP0067 controls the warning for policy CMP0067.
2378
2379 · CMAKE_POLICY_WARNING_CMP0082 controls the warning for policy CMP0082.
2380
2381 · CMAKE_POLICY_WARNING_CMP0089 controls the warning for policy CMP0089.
2382
2383 · CMAKE_POLICY_WARNING_CMP0102 controls the warning for policy CMP0102.
2384
2385 This variable should not be set by a project in CMake code. Project
2386 developers running CMake may set this variable in their cache to enable
2387 the warning (e.g. -DCMAKE_POLICY_WARNING_CMP<NNNN>=ON). Alternatively,
2388 running cmake(1) with the --debug-output, --trace, or --trace-expand
2389 option will also enable the warning.
2390
2391 CMAKE_PREFIX_PATH
2392 Semicolon-separated list of directories specifying installation pre‐
2393 fixes to be searched by the find_package(), find_program(),
2394 find_library(), find_file(), and find_path() commands. Each command
2395 will add appropriate subdirectories (like bin, lib, or include) as
2396 specified in its own documentation.
2397
2398 By default this is empty. It is intended to be set by the project.
2399
2400 See also CMAKE_SYSTEM_PREFIX_PATH, CMAKE_INCLUDE_PATH,
2401 CMAKE_LIBRARY_PATH, CMAKE_PROGRAM_PATH, and CMAKE_IGNORE_PATH.
2402
2403 CMAKE_PROGRAM_PATH
2404 Semicolon-separated list of directories specifying a search path for
2405 the find_program() command. By default it is empty, it is intended to
2406 be set by the project. See also CMAKE_SYSTEM_PROGRAM_PATH and
2407 CMAKE_PREFIX_PATH.
2408
2409 CMAKE_PROJECT_INCLUDE
2410 A CMake language file or module to be included as the last step of all
2411 project() command calls. This is intended for injecting custom code
2412 into project builds without modifying their source.
2413
2414 See also the CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE,
2415 CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE_BEFORE and
2416 CMAKE_PROJECT_INCLUDE_BEFORE variables.
2417
2418 CMAKE_PROJECT_INCLUDE_BEFORE
2419 A CMake language file or module to be included as the first step of all
2420 project() command calls. This is intended for injecting custom code
2421 into project builds without modifying their source.
2422
2423 See also the CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE,
2424 CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE_BEFORE and CMAKE_PROJECT_INCLUDE
2425 variables.
2426
2427 CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE
2428 A CMake language file or module to be included as the last step of any
2429 project() command calls that specify <PROJECT-NAME> as the project
2430 name. This is intended for injecting custom code into project builds
2431 without modifying their source.
2432
2433 See also the CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE_BEFORE,
2434 CMAKE_PROJECT_INCLUDE and CMAKE_PROJECT_INCLUDE_BEFORE variables.
2435
2436 CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE_BEFORE
2437 A CMake language file or module to be included as the first step of any
2438 project() command calls that specify <PROJECT-NAME> as the project
2439 name. This is intended for injecting custom code into project builds
2440 without modifying their source.
2441
2442 See also the CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE,
2443 CMAKE_PROJECT_INCLUDE and CMAKE_PROJECT_INCLUDE_BEFORE variables.
2444
2445 CMAKE_SKIP_INSTALL_ALL_DEPENDENCY
2446 Don’t make the install target depend on the all target.
2447
2448 By default, the install target depends on the all target. This has the
2449 effect, that when make install is invoked or INSTALL is built, first
2450 the all target is built, then the installation starts. If
2451 CMAKE_SKIP_INSTALL_ALL_DEPENDENCY is set to TRUE, this dependency is
2452 not created, so the installation process will start immediately, inde‐
2453 pendent from whether the project has been completely built or not.
2454
2455 CMAKE_STAGING_PREFIX
2456 This variable may be set to a path to install to when cross-compiling.
2457 This can be useful if the path in CMAKE_SYSROOT is read-only, or other‐
2458 wise should remain pristine.
2459
2460 The CMAKE_STAGING_PREFIX location is also used as a search prefix by
2461 the find_* commands. This can be controlled by setting the
2462 CMAKE_FIND_NO_INSTALL_PREFIX variable.
2463
2464 If any RPATH/RUNPATH entries passed to the linker contain the
2465 CMAKE_STAGING_PREFIX, the matching path fragments are replaced with the
2466 CMAKE_INSTALL_PREFIX.
2467
2468 CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS
2469 This variable contains a list of env vars as a list of tokens with the
2470 syntax var=value.
2471
2472 Example:
2473
2474 set(CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS
2475 "FOO=FOO1\;FOO2\;FOON"
2476 "BAR=BAR1\;BAR2\;BARN"
2477 "BAZ=BAZ1\;BAZ2\;BAZN"
2478 "FOOBAR=FOOBAR1\;FOOBAR2\;FOOBARN"
2479 "VALID="
2480 )
2481
2482 In case of malformed variables CMake will fail:
2483
2484 set(CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS
2485 "THIS_IS_NOT_VALID"
2486 )
2487
2488 CMAKE_SUBLIME_TEXT_2_EXCLUDE_BUILD_TREE
2489 If this variable evaluates to ON at the end of the top-level CMake‐
2490 Lists.txt file, the Sublime Text 2 extra generator excludes the build
2491 tree from the .sublime-project if it is inside the source tree.
2492
2493 CMAKE_SUPPRESS_REGENERATION
2494 If CMAKE_SUPPRESS_REGENERATION is OFF, which is default, then CMake
2495 adds a special target on which all other targets depend that checks the
2496 build system and optionally re-runs CMake to regenerate the build sys‐
2497 tem when the target specification source changes.
2498
2499 If this variable evaluates to ON at the end of the top-level CMake‐
2500 Lists.txt file, CMake will not add the regeneration target to the build
2501 system or perform any build system checks.
2502
2503 CMAKE_SYSROOT
2504 Path to pass to the compiler in the --sysroot flag.
2505
2506 The CMAKE_SYSROOT content is passed to the compiler in the --sysroot
2507 flag, if supported. The path is also stripped from the RPATH/RUNPATH
2508 if necessary on installation. The CMAKE_SYSROOT is also used to prefix
2509 paths searched by the find_* commands.
2510
2511 This variable may only be set in a toolchain file specified by the
2512 CMAKE_TOOLCHAIN_FILE variable.
2513
2514 See also the CMAKE_SYSROOT_COMPILE and CMAKE_SYSROOT_LINK variables.
2515
2516 CMAKE_SYSROOT_COMPILE
2517 Path to pass to the compiler in the --sysroot flag when compiling
2518 source files. This is the same as CMAKE_SYSROOT but is used only for
2519 compiling sources and not linking.
2520
2521 This variable may only be set in a toolchain file specified by the
2522 CMAKE_TOOLCHAIN_FILE variable.
2523
2524 CMAKE_SYSROOT_LINK
2525 Path to pass to the compiler in the --sysroot flag when linking. This
2526 is the same as CMAKE_SYSROOT but is used only for linking and not com‐
2527 piling sources.
2528
2529 This variable may only be set in a toolchain file specified by the
2530 CMAKE_TOOLCHAIN_FILE variable.
2531
2532 CMAKE_SYSTEM_APPBUNDLE_PATH
2533 Search path for macOS application bundles used by the find_program(),
2534 and find_package() commands. By default it contains the standard
2535 directories for the current system. It is not intended to be modified
2536 by the project, use CMAKE_APPBUNDLE_PATH for this.
2537
2538 CMAKE_SYSTEM_FRAMEWORK_PATH
2539 Search path for macOS frameworks used by the find_library(), find_pack‐
2540 age(), find_path(), and find_file() commands. By default it contains
2541 the standard directories for the current system. It is not intended to
2542 be modified by the project, use CMAKE_FRAMEWORK_PATH for this.
2543
2544 CMAKE_SYSTEM_IGNORE_PATH
2545 Semicolon-separated list of directories to be ignored by the find_pro‐
2546 gram(), find_library(), find_file(), and find_path() commands. This is
2547 useful in cross-compiling environments where some system directories
2548 contain incompatible but possibly linkable libraries. For example, on
2549 cross-compiled cluster environments, this allows a user to ignore
2550 directories containing libraries meant for the front-end machine.
2551
2552 By default this contains a list of directories containing incompatible
2553 binaries for the host system. See the CMAKE_IGNORE_PATH variable that
2554 is intended to be set by the project.
2555
2556 See also the CMAKE_SYSTEM_PREFIX_PATH, CMAKE_SYSTEM_LIBRARY_PATH,
2557 CMAKE_SYSTEM_INCLUDE_PATH, and CMAKE_SYSTEM_PROGRAM_PATH variables.
2558
2559 CMAKE_SYSTEM_INCLUDE_PATH
2560 Semicolon-separated list of directories specifying a search path for
2561 the find_file() and find_path() commands. By default this contains the
2562 standard directories for the current system. It is not intended to be
2563 modified by the project; use CMAKE_INCLUDE_PATH for this. See also
2564 CMAKE_SYSTEM_PREFIX_PATH.
2565
2566 CMAKE_SYSTEM_LIBRARY_PATH
2567 Semicolon-separated list of directories specifying a search path for
2568 the find_library() command. By default this contains the standard
2569 directories for the current system. It is not intended to be modified
2570 by the project; use CMAKE_LIBRARY_PATH for this. See also CMAKE_SYS‐
2571 TEM_PREFIX_PATH.
2572
2573 CMAKE_SYSTEM_PREFIX_PATH
2574 Semicolon-separated list of directories specifying installation pre‐
2575 fixes to be searched by the find_package(), find_program(),
2576 find_library(), find_file(), and find_path() commands. Each command
2577 will add appropriate subdirectories (like bin, lib, or include) as
2578 specified in its own documentation.
2579
2580 By default this contains the standard directories for the current sys‐
2581 tem, the CMAKE_INSTALL_PREFIX, and the CMAKE_STAGING_PREFIX. The
2582 installation and staging prefixes may be excluded by setting the
2583 CMAKE_FIND_NO_INSTALL_PREFIX variable.
2584
2585 CMAKE_SYSTEM_PREFIX_PATH is not intended to be modified by the project;
2586 use CMAKE_PREFIX_PATH for this.
2587
2588 See also CMAKE_SYSTEM_INCLUDE_PATH, CMAKE_SYSTEM_LIBRARY_PATH,
2589 CMAKE_SYSTEM_PROGRAM_PATH, and CMAKE_SYSTEM_IGNORE_PATH.
2590
2591 CMAKE_SYSTEM_PROGRAM_PATH
2592 Semicolon-separated list of directories specifying a search path for
2593 the find_program() command. By default this contains the standard
2594 directories for the current system. It is not intended to be modified
2595 by the project; use CMAKE_PROGRAM_PATH for this. See also CMAKE_SYS‐
2596 TEM_PREFIX_PATH.
2597
2598 CMAKE_USER_MAKE_RULES_OVERRIDE
2599 Specify a CMake file that overrides platform information.
2600
2601 CMake loads the specified file while enabling support for each language
2602 from either the project() or enable_language() commands. It is loaded
2603 after CMake’s builtin compiler and platform information modules have
2604 been loaded but before the information is used. The file may set plat‐
2605 form information variables to override CMake’s defaults.
2606
2607 This feature is intended for use only in overriding information vari‐
2608 ables that must be set before CMake builds its first test project to
2609 check that the compiler for a language works. It should not be used to
2610 load a file in cases that a normal include() will work. Use it only as
2611 a last resort for behavior that cannot be achieved any other way. For
2612 example, one may set the CMAKE_C_FLAGS_INIT variable to change the
2613 default value used to initialize the CMAKE_C_FLAGS variable before it
2614 is cached. The override file should NOT be used to set anything that
2615 could be set after languages are enabled, such as variables like
2616 CMAKE_RUNTIME_OUTPUT_DIRECTORY that affect the placement of binaries.
2617 Information set in the file will be used for try_compile() and
2618 try_run() builds too.
2619
2620 CMAKE_WARN_DEPRECATED
2621 Whether to issue warnings for deprecated functionality.
2622
2623 If not FALSE, use of deprecated functionality will issue warnings. If
2624 this variable is not set, CMake behaves as if it were set to TRUE.
2625
2626 When running cmake(1), this option can be enabled with the -Wdeprecated
2627 option, or disabled with the -Wno-deprecated option.
2628
2629 CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION
2630 Ask cmake_install.cmake script to warn each time a file with absolute
2631 INSTALL DESTINATION is encountered.
2632
2633 This variable is used by CMake-generated cmake_install.cmake scripts.
2634 If one sets this variable to ON while running the script, it may get
2635 warning messages from the script.
2636
2637 CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY
2638 If enabled, the Xcode generator will generate only a single Xcode
2639 project file for the topmost project() command instead of generating
2640 one for every project() command.
2641
2642 This could be useful to speed up the CMake generation step for large
2643 projects and to work-around a bug in the ZERO_CHECK logic.
2644
2645 CMAKE_XCODE_SCHEME_ADDRESS_SANITIZER
2646 Whether to enable Address Sanitizer in the Diagnostics section of the
2647 generated Xcode scheme.
2648
2649 This variable initializes the XCODE_SCHEME_ADDRESS_SANITIZER property
2650 on all targets.
2651
2652 Please refer to the XCODE_GENERATE_SCHEME target property documentation
2653 to see all Xcode schema related properties.
2654
2655 CMAKE_XCODE_SCHEME_ADDRESS_SANITIZER_USE_AFTER_RETURN
2656 Whether to enable Detect use of stack after return in the Diagnostics
2657 section of the generated Xcode scheme.
2658
2659 This variable initializes the XCODE_SCHEME_ADDRESS_SANI‐
2660 TIZER_USE_AFTER_RETURN property on all targets.
2661
2662 Please refer to the XCODE_GENERATE_SCHEME target property documentation
2663 to see all Xcode schema related properties.
2664
2665 CMAKE_XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING
2666 Whether to enable Allow debugging when using document Versions Browser
2667 in the Options section of the generated Xcode scheme.
2668
2669 This variable initializes the XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING
2670 property on all targets.
2671
2672 Please refer to the XCODE_GENERATE_SCHEME target property documentation
2673 to see all Xcode schema related properties.
2674
2675 CMAKE_XCODE_SCHEME_DISABLE_MAIN_THREAD_CHECKER
2676 Whether to disable the Main Thread Checker in the Diagnostics section
2677 of the generated Xcode scheme.
2678
2679 This variable initializes the XCODE_SCHEME_DISABLE_MAIN_THREAD_CHECKER
2680 property on all targets.
2681
2682 Please refer to the XCODE_GENERATE_SCHEME target property documentation
2683 to see all Xcode schema related properties.
2684
2685 CMAKE_XCODE_SCHEME_DYNAMIC_LIBRARY_LOADS
2686 Whether to enable Dynamic Library Loads in the Diagnostics section of
2687 the generated Xcode scheme.
2688
2689 This variable initializes the XCODE_SCHEME_DYNAMIC_LIBRARY_LOADS prop‐
2690 erty on all targets.
2691
2692 Please refer to the XCODE_GENERATE_SCHEME target property documentation
2693 to see all Xcode schema related properties.
2694
2695 CMAKE_XCODE_SCHEME_DYNAMIC_LINKER_API_USAGE
2696 Whether to enable Dynamic Linker API usage in the Diagnostics section
2697 of the generated Xcode scheme.
2698
2699 This variable initializes the XCODE_SCHEME_DYNAMIC_LINKER_API_USAGE
2700 property on all targets.
2701
2702 Please refer to the XCODE_GENERATE_SCHEME target property documentation
2703 to see all Xcode schema related properties.
2704
2705 CMAKE_XCODE_SCHEME_ENVIRONMENT
2706 Specify environment variables that should be added to the Arguments
2707 section of the generated Xcode scheme.
2708
2709 If set to a list of environment variables and values of the form
2710 MYVAR=value those environment variables will be added to the scheme.
2711
2712 This variable initializes the XCODE_SCHEME_ENVIRONMENT property on all
2713 targets.
2714
2715 Please refer to the XCODE_GENERATE_SCHEME target property documentation
2716 to see all Xcode schema related properties.
2717
2718 CMAKE_XCODE_SCHEME_GUARD_MALLOC
2719 Whether to enable Guard Malloc in the Diagnostics section of the gener‐
2720 ated Xcode scheme.
2721
2722 This variable initializes the XCODE_SCHEME_GUARD_MALLOC property on all
2723 targets.
2724
2725 Please refer to the XCODE_GENERATE_SCHEME target property documentation
2726 to see all Xcode schema related properties.
2727
2728 CMAKE_XCODE_SCHEME_MAIN_THREAD_CHECKER_STOP
2729 Whether to enable the Main Thread Checker option Pause on issues in the
2730 Diagnostics section of the generated Xcode scheme.
2731
2732 This variable initializes the XCODE_SCHEME_MAIN_THREAD_CHECKER_STOP
2733 property on all targets.
2734
2735 Please refer to the XCODE_GENERATE_SCHEME target property documentation
2736 to see all Xcode schema related properties.
2737
2738 CMAKE_XCODE_SCHEME_MALLOC_GUARD_EDGES
2739 Whether to enable Malloc Guard Edges in the Diagnostics section of the
2740 generated Xcode scheme.
2741
2742 This variable initializes the XCODE_SCHEME_MALLOC_GUARD_EDGES property
2743 on all targets.
2744
2745 Please refer to the XCODE_GENERATE_SCHEME target property documentation
2746 to see all Xcode schema related properties.
2747
2748 CMAKE_XCODE_SCHEME_MALLOC_SCRIBBLE
2749 Whether to enable Malloc Scribble in the Diagnostics section of the
2750 generated Xcode scheme.
2751
2752 This variable initializes the XCODE_SCHEME_MALLOC_SCRIBBLE property on
2753 all targets.
2754
2755 Please refer to the XCODE_GENERATE_SCHEME target property documentation
2756 to see all Xcode schema related properties.
2757
2758 CMAKE_XCODE_SCHEME_MALLOC_STACK
2759 Whether to enable Malloc Stack in the Diagnostics section of the gener‐
2760 ated Xcode scheme.
2761
2762 This variable initializes the XCODE_SCHEME_MALLOC_STACK property on all
2763 targets.
2764
2765 Please refer to the XCODE_GENERATE_SCHEME target property documentation
2766 to see all Xcode schema related properties.
2767
2768 CMAKE_XCODE_SCHEME_THREAD_SANITIZER
2769 Whether to enable Thread Sanitizer in the Diagnostics section of the
2770 generated Xcode scheme.
2771
2772 This variable initializes the XCODE_SCHEME_THREAD_SANITIZER property on
2773 all targets.
2774
2775 Please refer to the XCODE_GENERATE_SCHEME target property documentation
2776 to see all Xcode schema related properties.
2777
2778 CMAKE_XCODE_SCHEME_THREAD_SANITIZER_STOP
2779 Whether to enable Thread Sanitizer - Pause on issues in the Diagnostics
2780 section of the generated Xcode scheme.
2781
2782 This variable initializes the XCODE_SCHEME_THREAD_SANITIZER_STOP prop‐
2783 erty on all targets.
2784
2785 Please refer to the XCODE_GENERATE_SCHEME target property documentation
2786 to see all Xcode schema related properties.
2787
2788 CMAKE_XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER
2789 Whether to enable Undefined Behavior Sanitizer in the Diagnostics sec‐
2790 tion of the generated Xcode scheme.
2791
2792 This variable initializes the XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANI‐
2793 TIZER property on all targets.
2794
2795 Please refer to the XCODE_GENERATE_SCHEME target property documentation
2796 to see all Xcode schema related properties.
2797
2798 CMAKE_XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER_STOP
2799 Whether to enable Undefined Behavior Sanitizer option Pause on issues
2800 in the Diagnostics section of the generated Xcode scheme.
2801
2802 This variable initializes the XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANI‐
2803 TIZER_STOP property on all targets.
2804
2805 Please refer to the XCODE_GENERATE_SCHEME target property documentation
2806 to see all Xcode schema related properties.
2807
2808 CMAKE_XCODE_SCHEME_WORKING_DIRECTORY
2809 Specify the Working Directory of the Run and Profile actions in the
2810 generated Xcode scheme.
2811
2812 This variable initializes the XCODE_SCHEME_WORKING_DIRECTORY property
2813 on all targets.
2814
2815 Please refer to the XCODE_GENERATE_SCHEME target property documentation
2816 to see all Xcode schema related properties.
2817
2818 CMAKE_XCODE_SCHEME_ZOMBIE_OBJECTS
2819 Whether to enable Zombie Objects in the Diagnostics section of the gen‐
2820 erated Xcode scheme.
2821
2822 This variable initializes the XCODE_SCHEME_ZOMBIE_OBJECTS property on
2823 all targets.
2824
2825 Please refer to the XCODE_GENERATE_SCHEME target property documentation
2826 to see all Xcode schema related properties.
2827
2828 <PackageName>_ROOT
2829 Calls to find_package(<PackageName>) will search in prefixes specified
2830 by the <PackageName>_ROOT CMake variable, where <PackageName> is the
2831 name given to the find_package() call and _ROOT is literal. For exam‐
2832 ple, find_package(Foo) will search prefixes specified in the Foo_ROOT
2833 CMake variable (if set). See policy CMP0074.
2834
2835 This variable may hold a single prefix or a semicolon-separated list of
2836 multiple prefixes.
2837
2838 See also the <PackageName>_ROOT environment variable.
2839
2841 ANDROID
2842 Set to 1 when the target system (CMAKE_SYSTEM_NAME) is Android.
2843
2844 APPLE
2845 Set to True when the target system is an Apple platform (macOS, iOS,
2846 tvOS or watchOS).
2847
2848 BORLAND
2849 True if the Borland compiler is being used.
2850
2851 This is set to true if the Borland compiler is being used.
2852
2853 CMAKE_CL_64
2854 Discouraged. Use CMAKE_SIZEOF_VOID_P instead.
2855
2856 Set to a true value when using a Microsoft Visual Studio cl compiler
2857 that targets a 64-bit architecture.
2858
2859 CMAKE_COMPILER_2005
2860 Using the Visual Studio 2005 compiler from Microsoft
2861
2862 Set to true when using the Visual Studio 2005 compiler from Microsoft.
2863
2864 CMAKE_HOST_APPLE
2865 True for Apple macOS operating systems.
2866
2867 Set to true when the host system is Apple macOS.
2868
2869 CMAKE_HOST_SOLARIS
2870 True for Oracle Solaris operating systems.
2871
2872 Set to true when the host system is Oracle Solaris.
2873
2874 CMAKE_HOST_SYSTEM
2875 Composite Name of OS CMake is being run on.
2876
2877 This variable is the composite of CMAKE_HOST_SYSTEM_NAME and
2878 CMAKE_HOST_SYSTEM_VERSION, e.g. ${CMAKE_HOST_SYS‐
2879 TEM_NAME}-${CMAKE_HOST_SYSTEM_VERSION}. If CMAKE_HOST_SYSTEM_VERSION
2880 is not set, then this variable is the same as CMAKE_HOST_SYSTEM_NAME.
2881
2882 CMAKE_HOST_SYSTEM_NAME
2883 Name of the OS CMake is running on.
2884
2885 On systems that have the uname command, this variable is set to the
2886 output of uname -s. Linux, Windows, and Darwin for macOS are the val‐
2887 ues found on the big three operating systems.
2888
2889 CMAKE_HOST_SYSTEM_PROCESSOR
2890 The name of the CPU CMake is running on.
2891
2892 On Windows, this variable is set to the value of the environment vari‐
2893 able PROCESSOR_ARCHITECTURE. On systems that support uname, this vari‐
2894 able is set to the output of:
2895
2896 · uname -m on GNU, Linux, Cygwin, Darwin, Android, or
2897
2898 · arch on OpenBSD, or
2899
2900 · on other systems,
2901
2902 · uname -p if its exit code is nonzero, or
2903
2904 · uname -m otherwise.
2905
2906 CMAKE_HOST_SYSTEM_VERSION
2907 The OS version CMake is running on.
2908
2909 A numeric version string for the system. On systems that support
2910 uname, this variable is set to the output of uname -r. On other systems
2911 this is set to major-minor version numbers.
2912
2913 CMAKE_HOST_UNIX
2914 True for UNIX and UNIX like operating systems.
2915
2916 Set to true when the host system is UNIX or UNIX like (i.e. APPLE and
2917 CYGWIN).
2918
2919 CMAKE_HOST_WIN32
2920 True if the host system is running Windows, including Windows 64-bit
2921 and MSYS.
2922
2923 Set to false on Cygwin.
2924
2925 CMAKE_LIBRARY_ARCHITECTURE
2926 Target architecture library directory name, if detected.
2927
2928 This is the value of CMAKE_<LANG>_LIBRARY_ARCHITECTURE as detected for
2929 one of the enabled languages.
2930
2931 CMAKE_LIBRARY_ARCHITECTURE_REGEX
2932 Regex matching possible target architecture library directory names.
2933
2934 This is used to detect CMAKE_<LANG>_LIBRARY_ARCHITECTURE from the
2935 implicit linker search path by matching the <arch> name.
2936
2937 CMAKE_OBJECT_PATH_MAX
2938 Maximum object file full-path length allowed by native build tools.
2939
2940 CMake computes for every source file an object file name that is unique
2941 to the source file and deterministic with respect to the full path to
2942 the source file. This allows multiple source files in a target to
2943 share the same name if they lie in different directories without
2944 rebuilding when one is added or removed. However, it can produce long
2945 full paths in a few cases, so CMake shortens the path using a hashing
2946 scheme when the full path to an object file exceeds a limit. CMake has
2947 a built-in limit for each platform that is sufficient for common tools,
2948 but some native tools may have a lower limit. This variable may be set
2949 to specify the limit explicitly. The value must be an integer no less
2950 than 128.
2951
2952 CMAKE_SYSTEM
2953 Composite name of operating system CMake is compiling for.
2954
2955 This variable is the composite of CMAKE_SYSTEM_NAME and CMAKE_SYS‐
2956 TEM_VERSION, e.g. ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_VERSION}. If
2957 CMAKE_SYSTEM_VERSION is not set, then this variable is the same as
2958 CMAKE_SYSTEM_NAME.
2959
2960 CMAKE_SYSTEM_NAME
2961 The name of the operating system for which CMake is to build. See the
2962 CMAKE_SYSTEM_VERSION variable for the OS version.
2963
2964 Note that CMAKE_SYSTEM_NAME is not set to anything by default when run‐
2965 ning in script mode, since it’s not building anything.
2966
2967 System Name for Host Builds
2968 CMAKE_SYSTEM_NAME is by default set to the same value as the
2969 CMAKE_HOST_SYSTEM_NAME variable so that the build targets the host sys‐
2970 tem.
2971
2972 System Name for Cross Compiling
2973 CMAKE_SYSTEM_NAME may be set explicitly when first configuring a new
2974 build tree in order to enable cross compiling. In this case the
2975 CMAKE_SYSTEM_VERSION variable must also be set explicitly.
2976
2977 CMAKE_SYSTEM_PROCESSOR
2978 The name of the CPU CMake is building for.
2979
2980 This variable is the same as CMAKE_HOST_SYSTEM_PROCESSOR if you build
2981 for the host system instead of the target system when cross compiling.
2982
2983 CMAKE_SYSTEM_VERSION
2984 The version of the operating system for which CMake is to build. See
2985 the CMAKE_SYSTEM_NAME variable for the OS name.
2986
2987 System Version for Host Builds
2988 When the CMAKE_SYSTEM_NAME variable takes its default value then
2989 CMAKE_SYSTEM_VERSION is by default set to the same value as the
2990 CMAKE_HOST_SYSTEM_VERSION variable so that the build targets the host
2991 system version.
2992
2993 In the case of a host build then CMAKE_SYSTEM_VERSION may be set
2994 explicitly when first configuring a new build tree in order to enable
2995 targeting the build for a different version of the host operating sys‐
2996 tem than is actually running on the host. This is allowed and not con‐
2997 sidered cross compiling so long as the binaries built for the specified
2998 OS version can still run on the host.
2999
3000 System Version for Cross Compiling
3001 When the CMAKE_SYSTEM_NAME variable is set explicitly to enable cross
3002 compiling then the value of CMAKE_SYSTEM_VERSION must also be set
3003 explicitly to specify the target system version.
3004
3005 CYGWIN
3006 True for Cygwin.
3007
3008 Set to true when using Cygwin.
3009
3010 GHS-MULTI
3011 True when using Green Hills MULTI generator.
3012
3013 IOS
3014 Set to 1 when the target system (CMAKE_SYSTEM_NAME) is iOS.
3015
3016 MINGW
3017 True when using MinGW
3018
3019 Set to true when the compiler is some version of MinGW.
3020
3021 MSVC
3022 Set to true when the compiler is some version of Microsoft Visual C++
3023 or another compiler simulating Visual C++. Any compiler defining
3024 _MSC_VER is considered simulating Visual C++.
3025
3026 See also the MSVC_VERSION variable.
3027
3028 MSVC10
3029 Discouraged. Use the MSVC_VERSION variable instead.
3030
3031 True when using the Microsoft Visual Studio v100 toolset (cl version
3032 16) or another compiler that simulates it.
3033
3034 MSVC11
3035 Discouraged. Use the MSVC_VERSION variable instead.
3036
3037 True when using the Microsoft Visual Studio v110 toolset (cl version
3038 17) or another compiler that simulates it.
3039
3040 MSVC12
3041 Discouraged. Use the MSVC_VERSION variable instead.
3042
3043 True when using the Microsoft Visual Studio v120 toolset (cl version
3044 18) or another compiler that simulates it.
3045
3046 MSVC14
3047 Discouraged. Use the MSVC_VERSION variable instead.
3048
3049 True when using the Microsoft Visual Studio v140 or v141 toolset (cl
3050 version 19) or another compiler that simulates it.
3051
3052 MSVC60
3053 Discouraged. Use the MSVC_VERSION variable instead.
3054
3055 True when using Microsoft Visual C++ 6.0.
3056
3057 Set to true when the compiler is version 6.0 of Microsoft Visual C++.
3058
3059 MSVC70
3060 Discouraged. Use the MSVC_VERSION variable instead.
3061
3062 True when using Microsoft Visual C++ 7.0.
3063
3064 Set to true when the compiler is version 7.0 of Microsoft Visual C++.
3065
3066 MSVC71
3067 Discouraged. Use the MSVC_VERSION variable instead.
3068
3069 True when using Microsoft Visual C++ 7.1.
3070
3071 Set to true when the compiler is version 7.1 of Microsoft Visual C++.
3072
3073 MSVC80
3074 Discouraged. Use the MSVC_VERSION variable instead.
3075
3076 True when using the Microsoft Visual Studio v80 toolset (cl version 14)
3077 or another compiler that simulates it.
3078
3079 MSVC90
3080 Discouraged. Use the MSVC_VERSION variable instead.
3081
3082 True when using the Microsoft Visual Studio v90 toolset (cl version 15)
3083 or another compiler that simulates it.
3084
3085 MSVC_IDE
3086 True when using the Microsoft Visual C++ IDE.
3087
3088 Set to true when the target platform is the Microsoft Visual C++ IDE,
3089 as opposed to the command line compiler.
3090
3091 MSVC_TOOLSET_VERSION
3092 The toolset version of Microsoft Visual C/C++ being used if any. If
3093 MSVC-like is being used, this variable is set based on the version of
3094 the compiler as given by the MSVC_VERSION variable.
3095
3096 Known toolset version numbers are:
3097
3098 80 = VS 2005 (8.0)
3099 90 = VS 2008 (9.0)
3100 100 = VS 2010 (10.0)
3101 110 = VS 2012 (11.0)
3102 120 = VS 2013 (12.0)
3103 140 = VS 2015 (14.0)
3104 141 = VS 2017 (15.0)
3105 142 = VS 2019 (16.0)
3106
3107 Compiler versions newer than those known to CMake will be reported as
3108 the latest known toolset version.
3109
3110 See also the MSVC_VERSION variable.
3111
3112 MSVC_VERSION
3113 The version of Microsoft Visual C/C++ being used if any. If a compiler
3114 simulating Visual C++ is being used, this variable is set to the
3115 toolset version simulated as given by the _MSC_VER preprocessor defini‐
3116 tion.
3117
3118 Known version numbers are:
3119
3120 1200 = VS 6.0
3121 1300 = VS 7.0
3122 1310 = VS 7.1
3123 1400 = VS 8.0 (v80 toolset)
3124 1500 = VS 9.0 (v90 toolset)
3125 1600 = VS 10.0 (v100 toolset)
3126 1700 = VS 11.0 (v110 toolset)
3127 1800 = VS 12.0 (v120 toolset)
3128 1900 = VS 14.0 (v140 toolset)
3129 1910-1919 = VS 15.0 (v141 toolset)
3130 1920-1929 = VS 16.0 (v142 toolset)
3131
3132 See also the CMAKE_<LANG>_COMPILER_VERSION and MSVC_TOOLSET_VERSION
3133 variable.
3134
3135 MSYS
3136 True when using the MSYS Makefiles generator.
3137
3138 UNIX
3139 Set to True when the target system is UNIX or UNIX-like (e.g. APPLE and
3140 CYGWIN). The CMAKE_SYSTEM_NAME variable should be queried if a more
3141 specific understanding of the target system is required.
3142
3143 WIN32
3144 Set to True when the target system is Windows, including Win64.
3145
3146 WINCE
3147 True when the CMAKE_SYSTEM_NAME variable is set to WindowsCE.
3148
3149 WINDOWS_PHONE
3150 True when the CMAKE_SYSTEM_NAME variable is set to WindowsPhone.
3151
3152 WINDOWS_STORE
3153 True when the CMAKE_SYSTEM_NAME variable is set to WindowsStore.
3154
3155 XCODE
3156 True when using Xcode generator.
3157
3158 XCODE_VERSION
3159 Version of Xcode (Xcode generator only).
3160
3161 Under the Xcode generator, this is the version of Xcode as specified in
3162 Xcode.app/Contents/version.plist (such as 3.1.2).
3163
3165 CMAKE_AIX_EXPORT_ALL_SYMBOLS
3166 Default value for AIX_EXPORT_ALL_SYMBOLS target property. This vari‐
3167 able is used to initialize the property on each target as it is cre‐
3168 ated.
3169
3170 CMAKE_ANDROID_ANT_ADDITIONAL_OPTIONS
3171 Default value for the ANDROID_ANT_ADDITIONAL_OPTIONS target property.
3172 See that target property for additional information.
3173
3174 CMAKE_ANDROID_API
3175 When Cross Compiling for Android with NVIDIA Nsight Tegra Visual Studio
3176 Edition, this variable may be set to specify the default value for the
3177 ANDROID_API target property. See that target property for additional
3178 information.
3179
3180 Otherwise, when Cross Compiling for Android, this variable provides the
3181 Android API version number targeted. This will be the same value as
3182 the CMAKE_SYSTEM_VERSION variable for Android platforms.
3183
3184 CMAKE_ANDROID_API_MIN
3185 Default value for the ANDROID_API_MIN target property. See that target
3186 property for additional information.
3187
3188 CMAKE_ANDROID_ARCH
3189 When Cross Compiling for Android with NVIDIA Nsight Tegra Visual Studio
3190 Edition, this variable may be set to specify the default value for the
3191 ANDROID_ARCH target property. See that target property for additional
3192 information.
3193
3194 Otherwise, when Cross Compiling for Android, this variable provides the
3195 name of the Android architecture corresponding to the value of the
3196 CMAKE_ANDROID_ARCH_ABI variable. The architecture name may be one of:
3197
3198 · arm
3199
3200 · arm64
3201
3202 · mips
3203
3204 · mips64
3205
3206 · x86
3207
3208 · x86_64
3209
3210 CMAKE_ANDROID_ARCH_ABI
3211 When Cross Compiling for Android, this variable specifies the target
3212 architecture and ABI to be used. Valid values are:
3213
3214 · arm64-v8a
3215
3216 · armeabi-v7a
3217
3218 · armeabi-v6
3219
3220 · armeabi
3221
3222 · mips
3223
3224 · mips64
3225
3226 · x86
3227
3228 · x86_64
3229
3230 See also the CMAKE_ANDROID_ARM_MODE and CMAKE_ANDROID_ARM_NEON vari‐
3231 ables.
3232
3233 CMAKE_ANDROID_ARM_MODE
3234 When Cross Compiling for Android and CMAKE_ANDROID_ARCH_ABI is set to
3235 one of the armeabi architectures, set CMAKE_ANDROID_ARM_MODE to ON to
3236 target 32-bit ARM processors (-marm). Otherwise, the default is to
3237 target the 16-bit Thumb processors (-mthumb).
3238
3239 CMAKE_ANDROID_ARM_NEON
3240 When Cross Compiling for Android and CMAKE_ANDROID_ARCH_ABI is set to
3241 armeabi-v7a set CMAKE_ANDROID_ARM_NEON to ON to target ARM NEON
3242 devices.
3243
3244 CMAKE_ANDROID_ASSETS_DIRECTORIES
3245 Default value for the ANDROID_ASSETS_DIRECTORIES target property. See
3246 that target property for additional information.
3247
3248 CMAKE_ANDROID_GUI
3249 Default value for the ANDROID_GUI target property of executables. See
3250 that target property for additional information.
3251
3252 CMAKE_ANDROID_JAR_DEPENDENCIES
3253 Default value for the ANDROID_JAR_DEPENDENCIES target property. See
3254 that target property for additional information.
3255
3256 CMAKE_ANDROID_JAR_DIRECTORIES
3257 Default value for the ANDROID_JAR_DIRECTORIES target property. See
3258 that target property for additional information.
3259
3260 CMAKE_ANDROID_JAVA_SOURCE_DIR
3261 Default value for the ANDROID_JAVA_SOURCE_DIR target property. See
3262 that target property for additional information.
3263
3264 CMAKE_ANDROID_NATIVE_LIB_DEPENDENCIES
3265 Default value for the ANDROID_NATIVE_LIB_DEPENDENCIES target property.
3266 See that target property for additional information.
3267
3268 CMAKE_ANDROID_NATIVE_LIB_DIRECTORIES
3269 Default value for the ANDROID_NATIVE_LIB_DIRECTORIES target property.
3270 See that target property for additional information.
3271
3272 CMAKE_ANDROID_NDK
3273 When Cross Compiling for Android with the NDK, this variable holds the
3274 absolute path to the root directory of the NDK. The directory must
3275 contain a platforms subdirectory holding the android-<api> directories.
3276
3277 CMAKE_ANDROID_NDK_DEPRECATED_HEADERS
3278 When Cross Compiling for Android with the NDK, this variable may be set
3279 to specify whether to use the deprecated per-api-level headers instead
3280 of the unified headers.
3281
3282 If not specified, the default will be false if using a NDK version that
3283 provides the unified headers and true otherwise.
3284
3285 CMAKE_ANDROID_NDK_TOOLCHAIN_HOST_TAG
3286 When Cross Compiling for Android with the NDK, this variable provides
3287 the NDK’s “host tag” used to construct the path to prebuilt toolchains
3288 that run on the host.
3289
3290 CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION
3291 When Cross Compiling for Android with the NDK, this variable may be set
3292 to specify the version of the toolchain to be used as the compiler.
3293
3294 On NDK r19 or above, this variable must be unset or set to clang.
3295
3296 On NDK r18 or below, this variable must be set to one of these forms:
3297
3298 · <major>.<minor>: GCC of specified version
3299
3300 · clang<major>.<minor>: Clang of specified version
3301
3302 · clang: Clang of most recent available version
3303
3304 A toolchain of the requested version will be selected automatically to
3305 match the ABI named in the CMAKE_ANDROID_ARCH_ABI variable.
3306
3307 If not specified, the default will be a value that selects the latest
3308 available GCC toolchain.
3309
3310 CMAKE_ANDROID_PROCESS_MAX
3311 Default value for the ANDROID_PROCESS_MAX target property. See that
3312 target property for additional information.
3313
3314 CMAKE_ANDROID_PROGUARD
3315 Default value for the ANDROID_PROGUARD target property. See that tar‐
3316 get property for additional information.
3317
3318 CMAKE_ANDROID_PROGUARD_CONFIG_PATH
3319 Default value for the ANDROID_PROGUARD_CONFIG_PATH target property.
3320 See that target property for additional information.
3321
3322 CMAKE_ANDROID_SECURE_PROPS_PATH
3323 Default value for the ANDROID_SECURE_PROPS_PATH target property. See
3324 that target property for additional information.
3325
3326 CMAKE_ANDROID_SKIP_ANT_STEP
3327 Default value for the ANDROID_SKIP_ANT_STEP target property. See that
3328 target property for additional information.
3329
3330 CMAKE_ANDROID_STANDALONE_TOOLCHAIN
3331 When Cross Compiling for Android with a Standalone Toolchain, this
3332 variable holds the absolute path to the root directory of the
3333 toolchain. The specified directory must contain a sysroot subdirec‐
3334 tory.
3335
3336 CMAKE_ANDROID_STL_TYPE
3337 When Cross Compiling for Android with NVIDIA Nsight Tegra Visual Studio
3338 Edition, this variable may be set to specify the default value for the
3339 ANDROID_STL_TYPE target property. See that target property for addi‐
3340 tional information.
3341
3342 When Cross Compiling for Android with the NDK, this variable may be set
3343 to specify the STL variant to be used. The value may be one of:
3344
3345 none No C++ Support
3346
3347 system Minimal C++ without STL
3348
3349 gabi++_static
3350 GAbi++ Static
3351
3352 gabi++_shared
3353 GAbi++ Shared
3354
3355 gnustl_static
3356 GNU libstdc++ Static
3357
3358 gnustl_shared
3359 GNU libstdc++ Shared
3360
3361 c++_static
3362 LLVM libc++ Static
3363
3364 c++_shared
3365 LLVM libc++ Shared
3366
3367 stlport_static
3368 STLport Static
3369
3370 stlport_shared
3371 STLport Shared
3372
3373 The default value is gnustl_static on NDK versions that provide it and
3374 otherwise c++_static. Note that this default differs from the native
3375 NDK build system because CMake may be used to build projects for
3376 Android that are not natively implemented for it and use the C++ stan‐
3377 dard library.
3378
3379 CMAKE_ARCHIVE_OUTPUT_DIRECTORY
3380 Where to put all the ARCHIVE target files when built.
3381
3382 This variable is used to initialize the ARCHIVE_OUTPUT_DIRECTORY prop‐
3383 erty on all the targets. See that target property for additional
3384 information.
3385
3386 CMAKE_ARCHIVE_OUTPUT_DIRECTORY_<CONFIG>
3387 Where to put all the ARCHIVE target files when built for a specific
3388 configuration.
3389
3390 This variable is used to initialize the ARCHIVE_OUTPUT_DIRECTORY_<CON‐
3391 FIG> property on all the targets. See that target property for addi‐
3392 tional information.
3393
3394 CMAKE_AUTOGEN_ORIGIN_DEPENDS
3395 Switch for forwarding origin target dependencies to the corresponding
3396 _autogen targets.
3397
3398 This variable is used to initialize the AUTOGEN_ORIGIN_DEPENDS property
3399 on all the targets. See that target property for additional informa‐
3400 tion.
3401
3402 By default CMAKE_AUTOGEN_ORIGIN_DEPENDS is ON.
3403
3404 CMAKE_AUTOGEN_PARALLEL
3405 Number of parallel moc or uic processes to start when using AUTOMOC and
3406 AUTOUIC.
3407
3408 This variable is used to initialize the AUTOGEN_PARALLEL property on
3409 all the targets. See that target property for additional information.
3410
3411 By default CMAKE_AUTOGEN_PARALLEL is unset.
3412
3413 CMAKE_AUTOGEN_VERBOSE
3414 Sets the verbosity of AUTOMOC, AUTOUIC and AUTORCC. A positive integer
3415 value or a true boolean value lets the AUTO* generators output addi‐
3416 tional processing information.
3417
3418 Setting CMAKE_AUTOGEN_VERBOSE has the same effect as setting the VER‐
3419 BOSE environment variable during generation (e.g. by calling make VER‐
3420 BOSE=1). The extra verbosity is limited to the AUTO* generators
3421 though.
3422
3423 By default CMAKE_AUTOGEN_VERBOSE is unset.
3424
3425 CMAKE_AUTOMOC
3426 Whether to handle moc automatically for Qt targets.
3427
3428 This variable is used to initialize the AUTOMOC property on all the
3429 targets. See that target property for additional information.
3430
3431 CMAKE_AUTOMOC_COMPILER_PREDEFINES
3432 This variable is used to initialize the AUTOMOC_COMPILER_PREDEFINES
3433 property on all the targets. See that target property for additional
3434 information.
3435
3436 By default it is ON.
3437
3438 CMAKE_AUTOMOC_DEPEND_FILTERS
3439 Filter definitions used by CMAKE_AUTOMOC to extract file names from
3440 source code as additional dependencies for the moc file.
3441
3442 This variable is used to initialize the AUTOMOC_DEPEND_FILTERS property
3443 on all the targets. See that target property for additional informa‐
3444 tion.
3445
3446 By default it is empty.
3447
3448 CMAKE_AUTOMOC_MACRO_NAMES
3449 Semicolon-separated list list of macro names used by CMAKE_AUTOMOC to
3450 determine if a C++ file needs to be processed by moc.
3451
3452 This variable is used to initialize the AUTOMOC_MACRO_NAMES property on
3453 all the targets. See that target property for additional information.
3454
3455 The default value is Q_OBJECT;Q_GADGET;Q_NAMESPACE.
3456
3457 Example
3458 Let CMake know that source files that contain CUSTOM_MACRO must be moc
3459 processed as well:
3460
3461 set(CMAKE_AUTOMOC ON)
3462 list(APPEND CMAKE_AUTOMOC_MACRO_NAMES "CUSTOM_MACRO")
3463
3464 CMAKE_AUTOMOC_MOC_OPTIONS
3465 Additional options for moc when using CMAKE_AUTOMOC.
3466
3467 This variable is used to initialize the AUTOMOC_MOC_OPTIONS property on
3468 all the targets. See that target property for additional information.
3469
3470 CMAKE_AUTOMOC_PATH_PREFIX
3471 Whether to generate the -p path prefix option for moc on AUTOMOC
3472 enabled Qt targets.
3473
3474 This variable is used to initialize the AUTOMOC_PATH_PREFIX property on
3475 all the targets. See that target property for additional information.
3476
3477 The default value is ON.
3478
3479 CMAKE_AUTORCC
3480 Whether to handle rcc automatically for Qt targets.
3481
3482 This variable is used to initialize the AUTORCC property on all the
3483 targets. See that target property for additional information.
3484
3485 CMAKE_AUTORCC_OPTIONS
3486 Additional options for rcc when using CMAKE_AUTORCC.
3487
3488 This variable is used to initialize the AUTORCC_OPTIONS property on all
3489 the targets. See that target property for additional information.
3490
3491 EXAMPLE
3492 # ...
3493 set(CMAKE_AUTORCC_OPTIONS "--compress;9")
3494 # ...
3495
3496 CMAKE_AUTOUIC
3497 Whether to handle uic automatically for Qt targets.
3498
3499 This variable is used to initialize the AUTOUIC property on all the
3500 targets. See that target property for additional information.
3501
3502 CMAKE_AUTOUIC_OPTIONS
3503 Additional options for uic when using CMAKE_AUTOUIC.
3504
3505 This variable is used to initialize the AUTOUIC_OPTIONS property on all
3506 the targets. See that target property for additional information.
3507
3508 EXAMPLE
3509 # ...
3510 set_property(CMAKE_AUTOUIC_OPTIONS "--no-protection")
3511 # ...
3512
3513 CMAKE_AUTOUIC_SEARCH_PATHS
3514 Search path list used by CMAKE_AUTOUIC to find included .ui files.
3515
3516 This variable is used to initialize the AUTOUIC_SEARCH_PATHS property
3517 on all the targets. See that target property for additional informa‐
3518 tion.
3519
3520 By default it is empty.
3521
3522 CMAKE_BUILD_RPATH
3523 Semicolon-separated list specifying runtime path (RPATH) entries to add
3524 to binaries linked in the build tree (for platforms that support it).
3525 The entries will not be used for binaries in the install tree. See
3526 also the CMAKE_INSTALL_RPATH variable.
3527
3528 This is used to initialize the BUILD_RPATH target property for all tar‐
3529 gets.
3530
3531 CMAKE_BUILD_RPATH_USE_ORIGIN
3532 Whether to use relative paths for the build RPATH.
3533
3534 This is used to initialize the BUILD_RPATH_USE_ORIGIN target property
3535 for all targets, see that property for more details.
3536
3537 CMAKE_BUILD_WITH_INSTALL_NAME_DIR
3538 Whether to use INSTALL_NAME_DIR on targets in the build tree.
3539
3540 This variable is used to initialize the BUILD_WITH_INSTALL_NAME_DIR
3541 property on all targets.
3542
3543 CMAKE_BUILD_WITH_INSTALL_RPATH
3544 Use the install path for the RPATH.
3545
3546 Normally CMake uses the build tree for the RPATH when building executa‐
3547 bles etc on systems that use RPATH. When the software is installed the
3548 executables etc are relinked by CMake to have the install RPATH. If
3549 this variable is set to true then the software is always built with the
3550 install path for the RPATH and does not need to be relinked when
3551 installed.
3552
3553 CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY
3554 Output directory for MS debug symbol .pdb files generated by the com‐
3555 piler while building source files.
3556
3557 This variable is used to initialize the COMPILE_PDB_OUTPUT_DIRECTORY
3558 property on all the targets.
3559
3560 CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY_<CONFIG>
3561 Per-configuration output directory for MS debug symbol .pdb files gen‐
3562 erated by the compiler while building source files.
3563
3564 This is a per-configuration version of CMAKE_COMPILE_PDB_OUTPUT_DIREC‐
3565 TORY. This variable is used to initialize the COMPILE_PDB_OUT‐
3566 PUT_DIRECTORY_<CONFIG> property on all the targets.
3567
3568 CMAKE_<CONFIG>_POSTFIX
3569 Default filename postfix for libraries under configuration <CONFIG>.
3570
3571 When a non-executable target is created its <CONFIG>_POSTFIX target
3572 property is initialized with the value of this variable if it is set.
3573
3574 CMAKE_CROSS_CONFIGS
3575 Specifies a semicolon-separated list of configurations available from
3576 all build-<Config>.ninja files in the Ninja Multi-Config generator.
3577 This variable activates cross-config mode. Targets from each config
3578 specified in this variable can be built from any build-<Config>.ninja
3579 file. Custom commands will use the configuration native to build-<Con‐
3580 fig>.ninja. If it is set to all, all configurations from CMAKE_CONFIGU‐
3581 RATION_TYPES are cross-configs. If it is not specified, or empty, each
3582 build-<Config>.ninja file will only contain build rules for its own
3583 configuration.
3584
3585 The value of this variable must be a subset of CMAKE_CONFIGURA‐
3586 TION_TYPES.
3587
3588 CMAKE_CTEST_ARGUMENTS
3589 Set this to a semicolon-separated list of command-line arguments to
3590 pass to ctest(1) when running tests through the test (or RUN_TESTS)
3591 target of the generated build system.
3592
3593 CMAKE_CUDA_SEPARABLE_COMPILATION
3594 Default value for CUDA_SEPARABLE_COMPILATION target property. This
3595 variable is used to initialize the property on each target as it is
3596 created.
3597
3598 CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS
3599 Default value for CUDA_RESOLVE_DEVICE_SYMBOLS target property. This
3600 variable is used to initialize the property on each target as it is
3601 created.
3602
3603 CMAKE_CUDA_RUNTIME_LIBRARY
3604 Select the CUDA runtime library for use by compilers targeting the MSVC
3605 ABI. This variable is used to initialize the CUDA_RUNTIME_LIBRARY
3606 property on all targets as they are created.
3607
3608 The allowed case insensitive values are:
3609
3610 None Link with -cudart=none or equivalent flag(s) to use no CUDA run‐
3611 time library.
3612
3613 Shared Link with -cudart=shared or equivalent flag(s) to use a dynami‐
3614 cally-linked CUDA runtime library.
3615
3616 Static Link with -cudart=static or equivalent flag(s) to use a stati‐
3617 cally-linked CUDA runtime library.
3618
3619 Contents of CMAKE_CUDA_RUNTIME_LIBRARY may use generator expressions.
3620
3621 If this variable is not set then the CUDA_RUNTIME_LIBRARY target prop‐
3622 erty will not be set automatically. If that property is not set then
3623 CMake uses the default value Static to select the CUDA runtime library.
3624
3625 NOTE:
3626 This property has effect only when the CUDA language is enabled. To
3627 control the CUDA runtime linking when only using the CUDA SDK with
3628 the C or C++ language we recommend using the FindCUDAToolkit module.
3629
3630 CMAKE_DEBUG_POSTFIX
3631 See variable CMAKE_<CONFIG>_POSTFIX.
3632
3633 This variable is a special case of the more-general CMAKE_<CON‐
3634 FIG>_POSTFIX variable for the DEBUG configuration.
3635
3636 CMAKE_DEFAULT_BUILD_TYPE
3637 Specifies the configuration to use by default in a build.ninja file in
3638 the Ninja Multi-Config generator. If this variable is specified,
3639 build.ninja uses build rules from build-<Config>.ninja by default. All
3640 custom commands are executed with this configuration. If the variable
3641 is not specified, the first item from CMAKE_CONFIGURATION_TYPES is used
3642 instead.
3643
3644 The value of this variable must be one of the items from CMAKE_CONFIGU‐
3645 RATION_TYPES.
3646
3647 CMAKE_DEFAULT_CONFIGS
3648 Specifies a semicolon-separated list of configurations to build for a
3649 target in build.ninja if no :<Config> suffix is specified in the Ninja
3650 Multi-Config generator. If it is set to all, all configurations from
3651 CMAKE_CROSS_CONFIGS are used. If it is not specified, it defaults to
3652 CMAKE_DEFAULT_BUILD_TYPE.
3653
3654 For example, if you set CMAKE_DEFAULT_BUILD_TYPE to Release, but set
3655 CMAKE_DEFAULT_CONFIGS to Debug or all, all <target> aliases in
3656 build.ninja will resolve to <target>:Debug or <target>:all, but custom
3657 commands will still use the Release configuration.
3658
3659 The value of this variable must be a subset of CMAKE_CROSS_CONFIGS or
3660 be the same as CMAKE_DEFAULT_BUILD_TYPE. It must not be specified if
3661 CMAKE_DEFAULT_BUILD_TYPE or CMAKE_CROSS_CONFIGS is not used.
3662
3663 CMAKE_DISABLE_PRECOMPILE_HEADERS
3664 Default value for DISABLE_PRECOMPILE_HEADERS of targets.
3665
3666 By default CMAKE_DISABLE_PRECOMPILE_HEADERS is OFF.
3667
3668 CMAKE_ENABLE_EXPORTS
3669 Specify whether executables export symbols for loadable modules.
3670
3671 This variable is used to initialize the ENABLE_EXPORTS target property
3672 for executable targets when they are created by calls to the add_exe‐
3673 cutable() command. See the property documentation for details.
3674
3675 CMAKE_EXE_LINKER_FLAGS
3676 Linker flags to be used to create executables.
3677
3678 These flags will be used by the linker when creating an executable.
3679
3680 CMAKE_EXE_LINKER_FLAGS_<CONFIG>
3681 Flags to be used when linking an executable.
3682
3683 Same as CMAKE_C_FLAGS_* but used by the linker when creating executa‐
3684 bles.
3685
3686 CMAKE_EXE_LINKER_FLAGS_<CONFIG>_INIT
3687 Value used to initialize the CMAKE_EXE_LINKER_FLAGS_<CONFIG> cache
3688 entry the first time a build tree is configured. This variable is
3689 meant to be set by a toolchain file. CMake may prepend or append con‐
3690 tent to the value based on the environment and target platform.
3691
3692 See also CMAKE_EXE_LINKER_FLAGS_INIT.
3693
3694 CMAKE_EXE_LINKER_FLAGS_INIT
3695 Value used to initialize the CMAKE_EXE_LINKER_FLAGS cache entry the
3696 first time a build tree is configured. This variable is meant to be
3697 set by a toolchain file. CMake may prepend or append content to the
3698 value based on the environment and target platform.
3699
3700 See also the configuration-specific variable
3701 CMAKE_EXE_LINKER_FLAGS_<CONFIG>_INIT.
3702
3703 CMAKE_FOLDER
3704 Set the folder name. Use to organize targets in an IDE.
3705
3706 This variable is used to initialize the FOLDER property on all the tar‐
3707 gets. See that target property for additional information.
3708
3709 CMAKE_FRAMEWORK
3710 Default value for FRAMEWORK of targets.
3711
3712 This variable is used to initialize the FRAMEWORK property on all the
3713 targets. See that target property for additional information.
3714
3715 CMAKE_Fortran_FORMAT
3716 Set to FIXED or FREE to indicate the Fortran source layout.
3717
3718 This variable is used to initialize the Fortran_FORMAT property on all
3719 the targets. See that target property for additional information.
3720
3721 CMAKE_Fortran_MODULE_DIRECTORY
3722 Fortran module output directory.
3723
3724 This variable is used to initialize the Fortran_MODULE_DIRECTORY prop‐
3725 erty on all the targets. See that target property for additional
3726 information.
3727
3728 CMAKE_GHS_NO_SOURCE_GROUP_FILE
3729 ON / OFF boolean to control if the project file for a target should be
3730 one single file or multiple files. Refer to GHS_NO_SOURCE_GROUP_FILE
3731 for further details.
3732
3733 CMAKE_GLOBAL_AUTOGEN_TARGET
3734 Switch to enable generation of a global autogen target.
3735
3736 When CMAKE_GLOBAL_AUTOGEN_TARGET is enabled, a custom target autogen is
3737 generated. This target depends on all AUTOMOC and AUTOUIC generated
3738 <ORIGIN>_autogen targets in the project. By building the global auto‐
3739 gen target, all AUTOMOC and AUTOUIC files in the project will be gener‐
3740 ated.
3741
3742 The name of the global autogen target can be changed by setting
3743 CMAKE_GLOBAL_AUTOGEN_TARGET_NAME.
3744
3745 By default CMAKE_GLOBAL_AUTOGEN_TARGET is unset.
3746
3747 See the cmake-qt(7) manual for more information on using CMake with Qt.
3748
3749 Note
3750 <ORIGIN>_autogen targets by default inherit their origin target’s
3751 dependencies. This might result in unintended dependency target builds
3752 when only <ORIGIN>_autogen targets are built. A solution is to disable
3753 AUTOGEN_ORIGIN_DEPENDS on the respective origin targets.
3754
3755 CMAKE_GLOBAL_AUTOGEN_TARGET_NAME
3756 Change the name of the global autogen target.
3757
3758 When CMAKE_GLOBAL_AUTOGEN_TARGET is enabled, a global custom target
3759 named autogen is created. CMAKE_GLOBAL_AUTOGEN_TARGET_NAME allows to
3760 set a different name for that target.
3761
3762 By default CMAKE_GLOBAL_AUTOGEN_TARGET_NAME is unset.
3763
3764 See the cmake-qt(7) manual for more information on using CMake with Qt.
3765
3766 CMAKE_GLOBAL_AUTORCC_TARGET
3767 Switch to enable generation of a global autorcc target.
3768
3769 When CMAKE_GLOBAL_AUTORCC_TARGET is enabled, a custom target autorcc is
3770 generated. This target depends on all AUTORCC generated <ORI‐
3771 GIN>_arcc_<QRC> targets in the project. By building the global autorcc
3772 target, all AUTORCC files in the project will be generated.
3773
3774 The name of the global autorcc target can be changed by setting
3775 CMAKE_GLOBAL_AUTORCC_TARGET_NAME.
3776
3777 By default CMAKE_GLOBAL_AUTORCC_TARGET is unset.
3778
3779 See the cmake-qt(7) manual for more information on using CMake with Qt.
3780
3781 CMAKE_GLOBAL_AUTORCC_TARGET_NAME
3782 Change the name of the global autorcc target.
3783
3784 When CMAKE_GLOBAL_AUTORCC_TARGET is enabled, a global custom target
3785 named autorcc is created. CMAKE_GLOBAL_AUTORCC_TARGET_NAME allows to
3786 set a different name for that target.
3787
3788 By default CMAKE_GLOBAL_AUTOGEN_TARGET_NAME is unset.
3789
3790 See the cmake-qt(7) manual for more information on using CMake with Qt.
3791
3792 CMAKE_GNUtoMS
3793 Convert GNU import libraries (.dll.a) to MS format (.lib).
3794
3795 This variable is used to initialize the GNUtoMS property on targets
3796 when they are created. See that target property for additional infor‐
3797 mation.
3798
3799 CMAKE_INCLUDE_CURRENT_DIR
3800 Automatically add the current source and build directories to the
3801 include path.
3802
3803 If this variable is enabled, CMake automatically adds CMAKE_CUR‐
3804 RENT_SOURCE_DIR and CMAKE_CURRENT_BINARY_DIR to the include path for
3805 each directory. These additional include directories do not propagate
3806 down to subdirectories. This is useful mainly for out-of-source
3807 builds, where files generated into the build tree are included by files
3808 located in the source tree.
3809
3810 By default CMAKE_INCLUDE_CURRENT_DIR is OFF.
3811
3812 CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE
3813 Automatically add the current source and build directories to the
3814 INTERFACE_INCLUDE_DIRECTORIES target property.
3815
3816 If this variable is enabled, CMake automatically adds for each shared
3817 library target, static library target, module target and executable
3818 target, CMAKE_CURRENT_SOURCE_DIR and CMAKE_CURRENT_BINARY_DIR to the
3819 INTERFACE_INCLUDE_DIRECTORIES target property. By default
3820 CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE is OFF.
3821
3822 CMAKE_INSTALL_NAME_DIR
3823 macOS directory name for installed targets.
3824
3825 CMAKE_INSTALL_NAME_DIR is used to initialize the INSTALL_NAME_DIR prop‐
3826 erty on all targets. See that target property for more information.
3827
3828 CMAKE_INSTALL_REMOVE_ENVIRONMENT_RPATH
3829 Sets the default for whether toolchain-defined rpaths should be removed
3830 during installation.
3831
3832 CMAKE_INSTALL_REMOVE_ENVIRONMENT_RPATH is a boolean that provides the
3833 default value for the INSTALL_REMOVE_ENVIRONMENT_RPATH property of all
3834 subsequently created targets.
3835
3836 CMAKE_INSTALL_RPATH
3837 The rpath to use for installed targets.
3838
3839 A semicolon-separated list specifying the rpath to use in installed
3840 targets (for platforms that support it). This is used to initialize
3841 the target property INSTALL_RPATH for all targets.
3842
3843 CMAKE_INSTALL_RPATH_USE_LINK_PATH
3844 Add paths to linker search and installed rpath.
3845
3846 CMAKE_INSTALL_RPATH_USE_LINK_PATH is a boolean that if set to True will
3847 append to the runtime search path (rpath) of installed binaries any
3848 directories outside the project that are in the linker search path or
3849 contain linked library files. The directories are appended after the
3850 value of the INSTALL_RPATH target property.
3851
3852 This variable is used to initialize the target property
3853 INSTALL_RPATH_USE_LINK_PATH for all targets.
3854
3855 CMAKE_INTERPROCEDURAL_OPTIMIZATION
3856 Default value for INTERPROCEDURAL_OPTIMIZATION of targets.
3857
3858 This variable is used to initialize the INTERPROCEDURAL_OPTIMIZATION
3859 property on all the targets. See that target property for additional
3860 information.
3861
3862 CMAKE_INTERPROCEDURAL_OPTIMIZATION_<CONFIG>
3863 Default value for INTERPROCEDURAL_OPTIMIZATION_<CONFIG> of targets.
3864
3865 This variable is used to initialize the INTERPROCEDURAL_OPTIMIZA‐
3866 TION_<CONFIG> property on all the targets. See that target property
3867 for additional information.
3868
3869 CMAKE_IOS_INSTALL_COMBINED
3870 Default value for IOS_INSTALL_COMBINED of targets.
3871
3872 This variable is used to initialize the IOS_INSTALL_COMBINED property
3873 on all the targets. See that target property for additional informa‐
3874 tion.
3875
3876 CMAKE_<LANG>_CLANG_TIDY
3877 Default value for <LANG>_CLANG_TIDY target property when <LANG> is C or
3878 CXX.
3879
3880 This variable is used to initialize the property on each target as it
3881 is created. For example:
3882
3883 set(CMAKE_CXX_CLANG_TIDY clang-tidy -checks=-*,readability-*)
3884 add_executable(foo foo.cxx)
3885
3886 CMAKE_<LANG>_COMPILER_LAUNCHER
3887 Default value for <LANG>_COMPILER_LAUNCHER target property. This vari‐
3888 able is used to initialize the property on each target as it is cre‐
3889 ated. This is done only when <LANG> is C, CXX, Fortran, OBJC, OBJCXX,
3890 or CUDA.
3891
3892 This variable is initialized to the CMAKE_<LANG>_COMPILER_LAUNCHER
3893 environment variable if it is set.
3894
3895 CMAKE_<LANG>_CPPCHECK
3896 Default value for <LANG>_CPPCHECK target property. This variable is
3897 used to initialize the property on each target as it is created. This
3898 is done only when <LANG> is C or CXX.
3899
3900 CMAKE_<LANG>_CPPLINT
3901 Default value for <LANG>_CPPLINT target property. This variable is used
3902 to initialize the property on each target as it is created. This is
3903 done only when <LANG> is C or CXX.
3904
3905 CMAKE_<LANG>_INCLUDE_WHAT_YOU_USE
3906 Default value for <LANG>_INCLUDE_WHAT_YOU_USE target property. This
3907 variable is used to initialize the property on each target as it is
3908 created. This is done only when <LANG> is C or CXX.
3909
3910 CMAKE_<LANG>_LINK_LIBRARY_FILE_FLAG
3911 Language-specific flag to be used to link a library specified by a path
3912 to its file.
3913
3914 The flag will be used before a library file path is given to the
3915 linker. This is needed only on very few platforms.
3916
3917 CMAKE_<LANG>_LINK_LIBRARY_FLAG
3918 Flag to be used to link a library into a shared library or executable.
3919
3920 This flag will be used to specify a library to link to a shared library
3921 or an executable for the specific language. On most compilers this is
3922 -l.
3923
3924 CMAKE_<LANG>_VISIBILITY_PRESET
3925 Default value for the <LANG>_VISIBILITY_PRESET target property when a
3926 target is created.
3927
3928 CMAKE_LIBRARY_OUTPUT_DIRECTORY
3929 Where to put all the LIBRARY target files when built.
3930
3931 This variable is used to initialize the LIBRARY_OUTPUT_DIRECTORY prop‐
3932 erty on all the targets. See that target property for additional
3933 information.
3934
3935 CMAKE_LIBRARY_OUTPUT_DIRECTORY_<CONFIG>
3936 Where to put all the LIBRARY target files when built for a specific
3937 configuration.
3938
3939 This variable is used to initialize the LIBRARY_OUTPUT_DIRECTORY_<CON‐
3940 FIG> property on all the targets. See that target property for addi‐
3941 tional information.
3942
3943 CMAKE_LIBRARY_PATH_FLAG
3944 The flag to be used to add a library search path to a compiler.
3945
3946 The flag will be used to specify a library directory to the compiler.
3947 On most compilers this is -L.
3948
3949 CMAKE_LINK_DEF_FILE_FLAG
3950 Linker flag to be used to specify a .def file for dll creation.
3951
3952 The flag will be used to add a .def file when creating a dll on Win‐
3953 dows; this is only defined on Windows.
3954
3955 CMAKE_LINK_DEPENDS_NO_SHARED
3956 Whether to skip link dependencies on shared library files.
3957
3958 This variable initializes the LINK_DEPENDS_NO_SHARED property on tar‐
3959 gets when they are created. See that target property for additional
3960 information.
3961
3962 CMAKE_LINK_INTERFACE_LIBRARIES
3963 Default value for LINK_INTERFACE_LIBRARIES of targets.
3964
3965 This variable is used to initialize the LINK_INTERFACE_LIBRARIES prop‐
3966 erty on all the targets. See that target property for additional
3967 information.
3968
3969 CMAKE_LINK_LIBRARY_FILE_FLAG
3970 Flag to be used to link a library specified by a path to its file.
3971
3972 The flag will be used before a library file path is given to the
3973 linker. This is needed only on very few platforms.
3974
3975 CMAKE_LINK_LIBRARY_FLAG
3976 Flag to be used to link a library into an executable.
3977
3978 The flag will be used to specify a library to link to an executable.
3979 On most compilers this is -l.
3980
3981 CMAKE_LINK_WHAT_YOU_USE
3982 Default value for LINK_WHAT_YOU_USE target property. This variable is
3983 used to initialize the property on each target as it is created.
3984
3985 CMAKE_MACOSX_BUNDLE
3986 Default value for MACOSX_BUNDLE of targets.
3987
3988 This variable is used to initialize the MACOSX_BUNDLE property on all
3989 the targets. See that target property for additional information.
3990
3991 This variable is set to ON by default if CMAKE_SYSTEM_NAME equals to
3992 iOS, tvOS or watchOS.
3993
3994 CMAKE_MACOSX_RPATH
3995 Whether to use rpaths on macOS and iOS.
3996
3997 This variable is used to initialize the MACOSX_RPATH property on all
3998 targets.
3999
4000 CMAKE_MAP_IMPORTED_CONFIG_<CONFIG>
4001 Default value for MAP_IMPORTED_CONFIG_<CONFIG> of targets.
4002
4003 This variable is used to initialize the MAP_IMPORTED_CONFIG_<CONFIG>
4004 property on all the targets. See that target property for additional
4005 information.
4006
4007 CMAKE_MODULE_LINKER_FLAGS
4008 Linker flags to be used to create modules.
4009
4010 These flags will be used by the linker when creating a module.
4011
4012 CMAKE_MODULE_LINKER_FLAGS_<CONFIG>
4013 Flags to be used when linking a module.
4014
4015 Same as CMAKE_C_FLAGS_* but used by the linker when creating modules.
4016
4017 CMAKE_MODULE_LINKER_FLAGS_<CONFIG>_INIT
4018 Value used to initialize the CMAKE_MODULE_LINKER_FLAGS_<CONFIG> cache
4019 entry the first time a build tree is configured. This variable is
4020 meant to be set by a toolchain file. CMake may prepend or append con‐
4021 tent to the value based on the environment and target platform.
4022
4023 See also CMAKE_MODULE_LINKER_FLAGS_INIT.
4024
4025 CMAKE_MODULE_LINKER_FLAGS_INIT
4026 Value used to initialize the CMAKE_MODULE_LINKER_FLAGS cache entry the
4027 first time a build tree is configured. This variable is meant to be
4028 set by a toolchain file. CMake may prepend or append content to the
4029 value based on the environment and target platform.
4030
4031 See also the configuration-specific variable CMAKE_MOD‐
4032 ULE_LINKER_FLAGS_<CONFIG>_INIT.
4033
4034 CMAKE_MSVCIDE_RUN_PATH
4035 Extra PATH locations that should be used when executing add_custom_com‐
4036 mand() or add_custom_target() when using the Visual Studio 9 2008 (or
4037 above) generator. This allows for running commands and using dll’s that
4038 the IDE environment is not aware of.
4039
4040 If not set explicitly the value is initialized by the CMAKE_MSV‐
4041 CIDE_RUN_PATH environment variable, if set, and otherwise left empty.
4042
4043 CMAKE_MSVC_RUNTIME_LIBRARY
4044 Select the MSVC runtime library for use by compilers targeting the MSVC
4045 ABI. This variable is used to initialize the MSVC_RUNTIME_LIBRARY
4046 property on all targets as they are created. It is also propagated by
4047 calls to the try_compile() command into the test project.
4048
4049 The allowed values are:
4050
4051 MultiThreaded
4052 Compile with -MT or equivalent flag(s) to use a multi-threaded
4053 statically-linked runtime library.
4054
4055 MultiThreadedDLL
4056 Compile with -MD or equivalent flag(s) to use a multi-threaded
4057 dynamically-linked runtime library.
4058
4059 MultiThreadedDebug
4060 Compile with -MTd or equivalent flag(s) to use a multi-threaded
4061 statically-linked runtime library.
4062
4063 MultiThreadedDebugDLL
4064 Compile with -MDd or equivalent flag(s) to use a multi-threaded
4065 dynamically-linked runtime library.
4066
4067 The value is ignored on non-MSVC compilers but an unsupported value
4068 will be rejected as an error when using a compiler targeting the MSVC
4069 ABI.
4070
4071 The value may also be the empty string ("") in which case no runtime
4072 library selection flag will be added explicitly by CMake. Note that
4073 with Visual Studio Generators the native build system may choose to add
4074 its own default runtime library selection flag.
4075
4076 Use generator expressions to support per-configuration specification.
4077 For example, the code:
4078
4079 set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
4080
4081 selects for all following targets a multi-threaded statically-linked
4082 runtime library with or without debug information depending on the con‐
4083 figuration.
4084
4085 If this variable is not set then the MSVC_RUNTIME_LIBRARY target prop‐
4086 erty will not be set automatically. If that property is not set then
4087 CMake uses the default value MultiThreaded$<$<CONFIG:Debug>:Debug>DLL
4088 to select a MSVC runtime library.
4089
4090 NOTE:
4091 This variable has effect only when policy CMP0091 is set to NEW
4092 prior to the first project() or enable_language() command that
4093 enables a language using a compiler targeting the MSVC ABI.
4094
4095 CMAKE_NINJA_OUTPUT_PATH_PREFIX
4096 Set output files path prefix for the Ninja generator.
4097
4098 Every output files listed in the generated build.ninja will be prefixed
4099 by the contents of this variable (a trailing slash is appended if miss‐
4100 ing). This is useful when the generated ninja file is meant to be
4101 embedded as a subninja file into a super ninja project. For example, a
4102 ninja build file generated with a command like:
4103
4104 cd top-build-dir/sub &&
4105 cmake -G Ninja -DCMAKE_NINJA_OUTPUT_PATH_PREFIX=sub/ path/to/source
4106
4107 can be embedded in top-build-dir/build.ninja with a directive like
4108 this:
4109
4110 subninja sub/build.ninja
4111
4112 The auto-regeneration rule in top-build-dir/build.ninja must have an
4113 order-only dependency on sub/build.ninja.
4114
4115 NOTE:
4116 When CMAKE_NINJA_OUTPUT_PATH_PREFIX is set, the project generated by
4117 CMake cannot be used as a standalone project. No default targets
4118 are specified.
4119
4120 CMAKE_NO_BUILTIN_CHRPATH
4121 Do not use the builtin ELF editor to fix RPATHs on installation.
4122
4123 When an ELF binary needs to have a different RPATH after installation
4124 than it does in the build tree, CMake uses a builtin editor to change
4125 the RPATH in the installed copy. If this variable is set to true then
4126 CMake will relink the binary before installation instead of using its
4127 builtin editor.
4128
4129 CMAKE_NO_SYSTEM_FROM_IMPORTED
4130 Default value for NO_SYSTEM_FROM_IMPORTED of targets.
4131
4132 This variable is used to initialize the NO_SYSTEM_FROM_IMPORTED prop‐
4133 erty on all the targets. See that target property for additional
4134 information.
4135
4136 CMAKE_OSX_ARCHITECTURES
4137 Target specific architectures for macOS and iOS.
4138
4139 This variable is used to initialize the OSX_ARCHITECTURES property on
4140 each target as it is created. See that target property for additional
4141 information.
4142
4143 The value of this variable should be set prior to the first project()
4144 or enable_language() command invocation because it may influence con‐
4145 figuration of the toolchain and flags. It is intended to be set
4146 locally by the user creating a build tree. This variable should be set
4147 as a CACHE entry (or else CMake may remove it while initializing a
4148 cache entry of the same name).
4149
4150 Despite the OSX part in the variable name(s) they apply also to other
4151 SDKs than macOS like iOS, tvOS, or watchOS.
4152
4153 This variable is ignored on platforms other than Apple.
4154
4155 CMAKE_OSX_DEPLOYMENT_TARGET
4156 Specify the minimum version of the target platform (e.g. macOS or iOS)
4157 on which the target binaries are to be deployed. CMake uses this vari‐
4158 able value for the -mmacosx-version-min flag or their respective target
4159 platform equivalents. For older Xcode versions that shipped multiple
4160 macOS SDKs this variable also helps to choose the SDK in case
4161 CMAKE_OSX_SYSROOT is unset.
4162
4163 If not set explicitly the value is initialized by the MACOSX_DEPLOY‐
4164 MENT_TARGET environment variable, if set, and otherwise computed based
4165 on the host platform.
4166
4167 The value of this variable should be set prior to the first project()
4168 or enable_language() command invocation because it may influence con‐
4169 figuration of the toolchain and flags. It is intended to be set
4170 locally by the user creating a build tree. This variable should be set
4171 as a CACHE entry (or else CMake may remove it while initializing a
4172 cache entry of the same name).
4173
4174 Despite the OSX part in the variable name(s) they apply also to other
4175 SDKs than macOS like iOS, tvOS, or watchOS.
4176
4177 This variable is ignored on platforms other than Apple.
4178
4179 CMAKE_OSX_SYSROOT
4180 Specify the location or name of the macOS platform SDK to be used.
4181 CMake uses this value to compute the value of the -isysroot flag or
4182 equivalent and to help the find_* commands locate files in the SDK.
4183
4184 If not set explicitly the value is initialized by the SDKROOT environ‐
4185 ment variable, if set, and otherwise computed based on the
4186 CMAKE_OSX_DEPLOYMENT_TARGET or the host platform.
4187
4188 The value of this variable should be set prior to the first project()
4189 or enable_language() command invocation because it may influence con‐
4190 figuration of the toolchain and flags. It is intended to be set
4191 locally by the user creating a build tree. This variable should be set
4192 as a CACHE entry (or else CMake may remove it while initializing a
4193 cache entry of the same name).
4194
4195 Despite the OSX part in the variable name(s) they apply also to other
4196 SDKs than macOS like iOS, tvOS, or watchOS.
4197
4198 This variable is ignored on platforms other than Apple.
4199
4200 CMAKE_PDB_OUTPUT_DIRECTORY
4201 Output directory for MS debug symbol .pdb files generated by the linker
4202 for executable and shared library targets.
4203
4204 This variable is used to initialize the PDB_OUTPUT_DIRECTORY property
4205 on all the targets. See that target property for additional informa‐
4206 tion.
4207
4208 CMAKE_PDB_OUTPUT_DIRECTORY_<CONFIG>
4209 Per-configuration output directory for MS debug symbol .pdb files gen‐
4210 erated by the linker for executable and shared library targets.
4211
4212 This is a per-configuration version of CMAKE_PDB_OUTPUT_DIRECTORY.
4213 This variable is used to initialize the PDB_OUTPUT_DIRECTORY_<CONFIG>
4214 property on all the targets. See that target property for additional
4215 information.
4216
4217 CMAKE_POSITION_INDEPENDENT_CODE
4218 Default value for POSITION_INDEPENDENT_CODE of targets.
4219
4220 This variable is used to initialize the POSITION_INDEPENDENT_CODE prop‐
4221 erty on all the targets. See that target property for additional
4222 information. If set, it’s value is also used by the try_compile() com‐
4223 mand.
4224
4225 CMAKE_RUNTIME_OUTPUT_DIRECTORY
4226 Where to put all the RUNTIME target files when built.
4227
4228 This variable is used to initialize the RUNTIME_OUTPUT_DIRECTORY prop‐
4229 erty on all the targets. See that target property for additional
4230 information.
4231
4232 CMAKE_RUNTIME_OUTPUT_DIRECTORY_<CONFIG>
4233 Where to put all the RUNTIME target files when built for a specific
4234 configuration.
4235
4236 This variable is used to initialize the RUNTIME_OUTPUT_DIRECTORY_<CON‐
4237 FIG> property on all the targets. See that target property for addi‐
4238 tional information.
4239
4240 CMAKE_SHARED_LINKER_FLAGS
4241 Linker flags to be used to create shared libraries.
4242
4243 These flags will be used by the linker when creating a shared library.
4244
4245 CMAKE_SHARED_LINKER_FLAGS_<CONFIG>
4246 Flags to be used when linking a shared library.
4247
4248 Same as CMAKE_C_FLAGS_* but used by the linker when creating shared
4249 libraries.
4250
4251 CMAKE_SHARED_LINKER_FLAGS_<CONFIG>_INIT
4252 Value used to initialize the CMAKE_SHARED_LINKER_FLAGS_<CONFIG> cache
4253 entry the first time a build tree is configured. This variable is
4254 meant to be set by a toolchain file. CMake may prepend or append con‐
4255 tent to the value based on the environment and target platform.
4256
4257 See also CMAKE_SHARED_LINKER_FLAGS_INIT.
4258
4259 CMAKE_SHARED_LINKER_FLAGS_INIT
4260 Value used to initialize the CMAKE_SHARED_LINKER_FLAGS cache entry the
4261 first time a build tree is configured. This variable is meant to be
4262 set by a toolchain file. CMake may prepend or append content to the
4263 value based on the environment and target platform.
4264
4265 See also the configuration-specific variable
4266 CMAKE_SHARED_LINKER_FLAGS_<CONFIG>_INIT.
4267
4268 CMAKE_SKIP_BUILD_RPATH
4269 Do not include RPATHs in the build tree.
4270
4271 Normally CMake uses the build tree for the RPATH when building executa‐
4272 bles etc on systems that use RPATH. When the software is installed the
4273 executables etc are relinked by CMake to have the install RPATH. If
4274 this variable is set to true then the software is always built with no
4275 RPATH.
4276
4277 CMAKE_SKIP_INSTALL_RPATH
4278 Do not include RPATHs in the install tree.
4279
4280 Normally CMake uses the build tree for the RPATH when building executa‐
4281 bles etc on systems that use RPATH. When the software is installed the
4282 executables etc are relinked by CMake to have the install RPATH. If
4283 this variable is set to true then the software is always installed
4284 without RPATH, even if RPATH is enabled when building. This can be
4285 useful for example to allow running tests from the build directory with
4286 RPATH enabled before the installation step. To omit RPATH in both the
4287 build and install steps, use CMAKE_SKIP_RPATH instead.
4288
4289 CMAKE_STATIC_LINKER_FLAGS
4290 Flags to be used to create static libraries. These flags will be
4291 passed to the archiver when creating a static library.
4292
4293 See also CMAKE_STATIC_LINKER_FLAGS_<CONFIG>.
4294
4295 NOTE:
4296 Static libraries do not actually link. They are essentially ar‐
4297 chives of object files. The use of the name “linker” in the name of
4298 this variable is kept for compatibility.
4299
4300 CMAKE_STATIC_LINKER_FLAGS_<CONFIG>
4301 Flags to be used to create static libraries. These flags will be
4302 passed to the archiver when creating a static library in the <CONFIG>
4303 configuration.
4304
4305 See also CMAKE_STATIC_LINKER_FLAGS.
4306
4307 NOTE:
4308 Static libraries do not actually link. They are essentially ar‐
4309 chives of object files. The use of the name “linker” in the name of
4310 this variable is kept for compatibility.
4311
4312 CMAKE_STATIC_LINKER_FLAGS_<CONFIG>_INIT
4313 Value used to initialize the CMAKE_STATIC_LINKER_FLAGS_<CONFIG> cache
4314 entry the first time a build tree is configured. This variable is
4315 meant to be set by a toolchain file. CMake may prepend or append con‐
4316 tent to the value based on the environment and target platform.
4317
4318 See also CMAKE_STATIC_LINKER_FLAGS_INIT.
4319
4320 CMAKE_STATIC_LINKER_FLAGS_INIT
4321 Value used to initialize the CMAKE_STATIC_LINKER_FLAGS cache entry the
4322 first time a build tree is configured. This variable is meant to be
4323 set by a toolchain file. CMake may prepend or append content to the
4324 value based on the environment and target platform.
4325
4326 See also the configuration-specific variable
4327 CMAKE_STATIC_LINKER_FLAGS_<CONFIG>_INIT.
4328
4329 CMAKE_TRY_COMPILE_CONFIGURATION
4330 Build configuration used for try_compile() and try_run() projects.
4331
4332 Projects built by try_compile() and try_run() are built synchronously
4333 during the CMake configuration step. Therefore a specific build con‐
4334 figuration must be chosen even if the generated build system supports
4335 multiple configurations.
4336
4337 CMAKE_TRY_COMPILE_PLATFORM_VARIABLES
4338 List of variables that the try_compile() command source file signature
4339 must propagate into the test project in order to target the same plat‐
4340 form as the host project.
4341
4342 This variable should not be set by project code. It is meant to be set
4343 by CMake’s platform information modules for the current toolchain, or
4344 by a toolchain file when used with CMAKE_TOOLCHAIN_FILE.
4345
4346 Variables meaningful to CMake, such as CMAKE_<LANG>_FLAGS, are propa‐
4347 gated automatically. The CMAKE_TRY_COMPILE_PLATFORM_VARIABLES variable
4348 may be set to pass custom variables meaningful to a toolchain file.
4349 For example, a toolchain file may contain:
4350
4351 set(CMAKE_SYSTEM_NAME ...)
4352 set(CMAKE_TRY_COMPILE_PLATFORM_VARIABLES MY_CUSTOM_VARIABLE)
4353 # ... use MY_CUSTOM_VARIABLE ...
4354
4355 If a user passes -DMY_CUSTOM_VARIABLE=SomeValue to CMake then this set‐
4356 ting will be made visible to the toolchain file both for the main
4357 project and for test projects generated by the try_compile() command
4358 source file signature.
4359
4360 CMAKE_TRY_COMPILE_TARGET_TYPE
4361 Type of target generated for try_compile() calls using the source file
4362 signature. Valid values are:
4363
4364 EXECUTABLE
4365 Use add_executable() to name the source file in the generated
4366 project. This is the default if no value is given.
4367
4368 STATIC_LIBRARY
4369 Use add_library() with the STATIC option to name the source file
4370 in the generated project. This avoids running the linker and is
4371 intended for use with cross-compiling toolchains that cannot
4372 link without custom flags or linker scripts.
4373
4374 CMAKE_UNITY_BUILD
4375 This variable is used to initialize the UNITY_BUILD property of targets
4376 when they are created. Setting it to true enables batch compilation of
4377 multiple sources within each target. This feature is known as a Unity
4378 or Jumbo build.
4379
4380 Projects should not set this variable, it is intended as a developer
4381 control to be set on the cmake(1) command line or other equivalent
4382 methods. The developer must have the ability to enable or disable
4383 unity builds according to the capabilities of their own machine and
4384 compiler.
4385
4386 By default, this variable is not set, which will result in unity builds
4387 being disabled.
4388
4389 NOTE:
4390 This option currently does not work well in combination with the
4391 CMAKE_EXPORT_COMPILE_COMMANDS variable.
4392
4393 CMAKE_UNITY_BUILD_BATCH_SIZE
4394 This variable is used to initialize the UNITY_BUILD_BATCH_SIZE property
4395 of targets when they are created. It specifies the default upper limit
4396 on the number of source files that may be combined in any one unity
4397 source file when unity builds are enabled for a target.
4398
4399 CMAKE_USE_RELATIVE_PATHS
4400 This variable has no effect. The partially implemented effect it had
4401 in previous releases was removed in CMake 3.4.
4402
4403 CMAKE_VISIBILITY_INLINES_HIDDEN
4404 Default value for the VISIBILITY_INLINES_HIDDEN target property when a
4405 target is created.
4406
4407 CMAKE_VS_GLOBALS
4408 List of Key=Value records to be set per target as target properties
4409 VS_GLOBAL_<variable> with variable=Key and value Value.
4410
4411 For example:
4412
4413 set(CMAKE_VS_GLOBALS
4414 "DefaultLanguage=en-US"
4415 "MinimumVisualStudioVersion=14.0"
4416 )
4417
4418 will set properties VS_GLOBAL_DefaultLanguage to en-US and
4419 VS_GLOBAL_MinimumVisualStudioVersion to 14.0 for all targets (except
4420 for INTERFACE libraries).
4421
4422 This variable is meant to be set by a toolchain file.
4423
4424 CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD
4425 Include INSTALL target to default build.
4426
4427 In Visual Studio solution, by default the INSTALL target will not be
4428 part of the default build. Setting this variable will enable the
4429 INSTALL target to be part of the default build.
4430
4431 CMAKE_VS_INCLUDE_PACKAGE_TO_DEFAULT_BUILD
4432 Include PACKAGE target to default build.
4433
4434 In Visual Studio solution, by default the PACKAGE target will not be
4435 part of the default build. Setting this variable will enable the PACK‐
4436 AGE target to be part of the default build.
4437
4438 CMAKE_VS_JUST_MY_CODE_DEBUGGING
4439 Enable Just My Code with Visual Studio debugger.
4440
4441 This variable is used to initialize the VS_JUST_MY_CODE_DEBUGGING prop‐
4442 erty on all targets when they are created. See that target property
4443 for additional information.
4444
4445 CMAKE_VS_SDK_EXCLUDE_DIRECTORIES
4446 This variable allows to override Visual Studio default Exclude Directo‐
4447 ries.
4448
4449 CMAKE_VS_SDK_EXECUTABLE_DIRECTORIES
4450 This variable allows to override Visual Studio default Executable
4451 Directories.
4452
4453 CMAKE_VS_SDK_INCLUDE_DIRECTORIES
4454 This variable allows to override Visual Studio default Include Directo‐
4455 ries.
4456
4457 CMAKE_VS_SDK_LIBRARY_DIRECTORIES
4458 This variable allows to override Visual Studio default Library Directo‐
4459 ries.
4460
4461 CMAKE_VS_SDK_LIBRARY_WINRT_DIRECTORIES
4462 This variable allows to override Visual Studio default Library WinRT
4463 Directories.
4464
4465 CMAKE_VS_SDK_REFERENCE_DIRECTORIES
4466 This variable allows to override Visual Studio default Reference Direc‐
4467 tories.
4468
4469 CMAKE_VS_SDK_SOURCE_DIRECTORIES
4470 This variable allows to override Visual Studio default Source Directo‐
4471 ries.
4472
4473 CMAKE_VS_WINRT_BY_DEFAULT
4474 Inform Visual Studio Generators for VS 2010 and above that the target
4475 platform enables WinRT compilation by default and it needs to be
4476 explicitly disabled if /ZW or VS_WINRT_COMPONENT is omitted (as opposed
4477 to enabling it when either of those options is present)
4478
4479 This makes cmake configuration consistent in terms of WinRT among plat‐
4480 forms - if you did not enable the WinRT compilation explicitly, it will
4481 be disabled (by either not enabling it or explicitly disabling it)
4482
4483 Note: WinRT compilation is always explicitly disabled for C language
4484 source files, even if it is expliclty enabled for a project
4485
4486 This variable is meant to be set by a toolchain file for such plat‐
4487 forms.
4488
4489 CMAKE_WIN32_EXECUTABLE
4490 Default value for WIN32_EXECUTABLE of targets.
4491
4492 This variable is used to initialize the WIN32_EXECUTABLE property on
4493 all the targets. See that target property for additional information.
4494
4495 CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS
4496 Default value for WINDOWS_EXPORT_ALL_SYMBOLS target property. This
4497 variable is used to initialize the property on each target as it is
4498 created.
4499
4500 CMAKE_XCODE_ATTRIBUTE_<an-attribute>
4501 Set Xcode target attributes directly.
4502
4503 Tell the Xcode generator to set ‘<an-attribute>’ to a given value in
4504 the generated Xcode project. Ignored on other generators.
4505
4506 See the XCODE_ATTRIBUTE_<an-attribute> target property to set
4507 attributes on a specific target.
4508
4509 Contents of CMAKE_XCODE_ATTRIBUTE_<an-attribute> may use “generator
4510 expressions” with the syntax $<...>. See the cmake-generator-expres‐
4511 sions(7) manual for available expressions. See the cmake-buildsys‐
4512 tem(7) manual for more on defining buildsystem properties.
4513
4514 EXECUTABLE_OUTPUT_PATH
4515 Old executable location variable.
4516
4517 The target property RUNTIME_OUTPUT_DIRECTORY supercedes this variable
4518 for a target if it is set. Executable targets are otherwise placed in
4519 this directory.
4520
4521 LIBRARY_OUTPUT_PATH
4522 Old library location variable.
4523
4524 The target properties ARCHIVE_OUTPUT_DIRECTORY, LIBRARY_OUTPUT_DIREC‐
4525 TORY, and RUNTIME_OUTPUT_DIRECTORY supersede this variable for a target
4526 if they are set. Library targets are otherwise placed in this direc‐
4527 tory.
4528
4530 CMAKE_COMPILER_IS_GNUCC
4531 True if the C compiler is GNU. Use CMAKE_C_COMPILER_ID instead.
4532
4533 CMAKE_COMPILER_IS_GNUCXX
4534 True if the C++ (CXX) compiler is GNU. Use CMAKE_CXX_COMPILER_ID
4535 instead.
4536
4537 CMAKE_COMPILER_IS_GNUG77
4538 True if the Fortran compiler is GNU. Use CMAKE_Fortran_COMPILER_ID
4539 instead.
4540
4541 CMAKE_CUDA_COMPILE_FEATURES
4542 List of features known to the CUDA compiler
4543
4544 These features are known to be available for use with the CUDA com‐
4545 piler. This list is a subset of the features listed in the
4546 CMAKE_CUDA_KNOWN_FEATURES global property.
4547
4548 See the cmake-compile-features(7) manual for information on compile
4549 features and a list of supported compilers.
4550
4551 CMAKE_CUDA_HOST_COMPILER
4552 Executable to use when compiling host code when compiling CUDA language
4553 files. Maps to the nvcc -ccbin option. Will only be used by CMake on
4554 the first configuration to determine a valid host compiler for CUDA.
4555 After a valid host compiler has been found, this value is read-only.
4556 This variable takes priority over the CUDAHOSTCXX environment variable.
4557
4558 CMAKE_CUDA_EXTENSIONS
4559 Default value for CUDA_EXTENSIONS property of targets.
4560
4561 This variable is used to initialize the CUDA_EXTENSIONS property on all
4562 targets. See that target property for additional information.
4563
4564 See the cmake-compile-features(7) manual for information on compile
4565 features and a list of supported compilers.
4566
4567 CMAKE_CUDA_STANDARD
4568 Default value for CUDA_STANDARD property of targets.
4569
4570 This variable is used to initialize the CUDA_STANDARD property on all
4571 targets. See that target property for additional information.
4572
4573 See the cmake-compile-features(7) manual for information on compile
4574 features and a list of supported compilers.
4575
4576 CMAKE_CUDA_STANDARD_REQUIRED
4577 Default value for CUDA_STANDARD_REQUIRED property of targets.
4578
4579 This variable is used to initialize the CUDA_STANDARD_REQUIRED property
4580 on all targets. See that target property for additional information.
4581
4582 See the cmake-compile-features(7) manual for information on compile
4583 features and a list of supported compilers.
4584
4585 CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES
4586 When the CUDA language has been enabled, this provides a semicolon-sep‐
4587 arated list of include directories provided by the CUDA Toolkit. The
4588 value may be useful for C++ source files to include CUDA headers.
4589
4590 CMAKE_CXX_COMPILE_FEATURES
4591 List of features known to the C++ compiler
4592
4593 These features are known to be available for use with the C++ compiler.
4594 This list is a subset of the features listed in the
4595 CMAKE_CXX_KNOWN_FEATURES global property.
4596
4597 See the cmake-compile-features(7) manual for information on compile
4598 features and a list of supported compilers.
4599
4600 CMAKE_CXX_EXTENSIONS
4601 Default value for CXX_EXTENSIONS property of targets.
4602
4603 This variable is used to initialize the CXX_EXTENSIONS property on all
4604 targets. See that target property for additional information.
4605
4606 See the cmake-compile-features(7) manual for information on compile
4607 features and a list of supported compilers.
4608
4609 CMAKE_CXX_STANDARD
4610 Default value for CXX_STANDARD property of targets.
4611
4612 This variable is used to initialize the CXX_STANDARD property on all
4613 targets. See that target property for additional information.
4614
4615 See the cmake-compile-features(7) manual for information on compile
4616 features and a list of supported compilers.
4617
4618 CMAKE_CXX_STANDARD_REQUIRED
4619 Default value for CXX_STANDARD_REQUIRED property of targets.
4620
4621 This variable is used to initialize the CXX_STANDARD_REQUIRED property
4622 on all targets. See that target property for additional information.
4623
4624 See the cmake-compile-features(7) manual for information on compile
4625 features and a list of supported compilers.
4626
4627 CMAKE_C_COMPILE_FEATURES
4628 List of features known to the C compiler
4629
4630 These features are known to be available for use with the C compiler.
4631 This list is a subset of the features listed in the CMAKE_C_KNOWN_FEA‐
4632 TURES global property.
4633
4634 See the cmake-compile-features(7) manual for information on compile
4635 features and a list of supported compilers.
4636
4637 CMAKE_C_EXTENSIONS
4638 Default value for C_EXTENSIONS property of targets.
4639
4640 This variable is used to initialize the C_EXTENSIONS property on all
4641 targets. See that target property for additional information.
4642
4643 See the cmake-compile-features(7) manual for information on compile
4644 features and a list of supported compilers.
4645
4646 CMAKE_C_STANDARD
4647 Default value for C_STANDARD property of targets.
4648
4649 This variable is used to initialize the C_STANDARD property on all tar‐
4650 gets. See that target property for additional information.
4651
4652 See the cmake-compile-features(7) manual for information on compile
4653 features and a list of supported compilers.
4654
4655 CMAKE_C_STANDARD_REQUIRED
4656 Default value for C_STANDARD_REQUIRED property of targets.
4657
4658 This variable is used to initialize the C_STANDARD_REQUIRED property on
4659 all targets. See that target property for additional information.
4660
4661 See the cmake-compile-features(7) manual for information on compile
4662 features and a list of supported compilers.
4663
4664 CMAKE_Fortran_MODDIR_DEFAULT
4665 Fortran default module output directory.
4666
4667 Most Fortran compilers write .mod files to the current working direc‐
4668 tory. For those that do not, this is set to . and used when the For‐
4669 tran_MODULE_DIRECTORY target property is not set.
4670
4671 CMAKE_Fortran_MODDIR_FLAG
4672 Fortran flag for module output directory.
4673
4674 This stores the flag needed to pass the value of the Fortran_MOD‐
4675 ULE_DIRECTORY target property to the compiler.
4676
4677 CMAKE_Fortran_MODOUT_FLAG
4678 Fortran flag to enable module output.
4679
4680 Most Fortran compilers write .mod files out by default. For others,
4681 this stores the flag needed to enable module output.
4682
4683 CMAKE_<LANG>_ANDROID_TOOLCHAIN_MACHINE
4684 When Cross Compiling for Android this variable contains the toolchain
4685 binutils machine name (e.g. gcc -dumpmachine). The binutils typically
4686 have a <machine>- prefix on their name.
4687
4688 See also CMAKE_<LANG>_ANDROID_TOOLCHAIN_PREFIX and
4689 CMAKE_<LANG>_ANDROID_TOOLCHAIN_SUFFIX.
4690
4691 CMAKE_<LANG>_ANDROID_TOOLCHAIN_PREFIX
4692 When Cross Compiling for Android this variable contains the absolute
4693 path prefixing the toolchain GNU compiler and its binutils.
4694
4695 See also CMAKE_<LANG>_ANDROID_TOOLCHAIN_SUFFIX and
4696 CMAKE_<LANG>_ANDROID_TOOLCHAIN_MACHINE.
4697
4698 For example, the path to the linker is:
4699
4700 ${CMAKE_CXX_ANDROID_TOOLCHAIN_PREFIX}ld${CMAKE_CXX_ANDROID_TOOLCHAIN_SUFFIX}
4701
4702 CMAKE_<LANG>_ANDROID_TOOLCHAIN_SUFFIX
4703 When Cross Compiling for Android this variable contains the host plat‐
4704 form suffix of the toolchain GNU compiler and its binutils.
4705
4706 See also CMAKE_<LANG>_ANDROID_TOOLCHAIN_PREFIX and
4707 CMAKE_<LANG>_ANDROID_TOOLCHAIN_MACHINE.
4708
4709 CMAKE_<LANG>_ARCHIVE_APPEND
4710 Rule variable to append to a static archive.
4711
4712 This is a rule variable that tells CMake how to append to a static ar‐
4713 chive. It is used in place of CMAKE_<LANG>_CREATE_STATIC_LIBRARY on
4714 some platforms in order to support large object counts. See also
4715 CMAKE_<LANG>_ARCHIVE_CREATE and CMAKE_<LANG>_ARCHIVE_FINISH.
4716
4717 CMAKE_<LANG>_ARCHIVE_CREATE
4718 Rule variable to create a new static archive.
4719
4720 This is a rule variable that tells CMake how to create a static ar‐
4721 chive. It is used in place of CMAKE_<LANG>_CREATE_STATIC_LIBRARY on
4722 some platforms in order to support large object counts. See also
4723 CMAKE_<LANG>_ARCHIVE_APPEND and CMAKE_<LANG>_ARCHIVE_FINISH.
4724
4725 CMAKE_<LANG>_ARCHIVE_FINISH
4726 Rule variable to finish an existing static archive.
4727
4728 This is a rule variable that tells CMake how to finish a static ar‐
4729 chive. It is used in place of CMAKE_<LANG>_CREATE_STATIC_LIBRARY on
4730 some platforms in order to support large object counts. See also
4731 CMAKE_<LANG>_ARCHIVE_CREATE and CMAKE_<LANG>_ARCHIVE_APPEND.
4732
4733 CMAKE_<LANG>_COMPILER
4734 The full path to the compiler for LANG.
4735
4736 This is the command that will be used as the <LANG> compiler. Once
4737 set, you can not change this variable.
4738
4739 CMAKE_<LANG>_COMPILER_EXTERNAL_TOOLCHAIN
4740 The external toolchain for cross-compiling, if supported.
4741
4742 Some compiler toolchains do not ship their own auxiliary utilities such
4743 as archivers and linkers. The compiler driver may support a com‐
4744 mand-line argument to specify the location of such tools.
4745 CMAKE_<LANG>_COMPILER_EXTERNAL_TOOLCHAIN may be set to a path to the
4746 external toolchain and will be passed to the compiler driver if sup‐
4747 ported.
4748
4749 This variable may only be set in a toolchain file specified by the
4750 CMAKE_TOOLCHAIN_FILE variable.
4751
4752 CMAKE_<LANG>_COMPILER_ID
4753 Compiler identification string.
4754
4755 A short string unique to the compiler vendor. Possible values include:
4756
4757 Absoft = Absoft Fortran (absoft.com)
4758 ADSP = Analog VisualDSP++ (analog.com)
4759 AppleClang = Apple Clang (apple.com)
4760 ARMCC = ARM Compiler (arm.com)
4761 ARMClang = ARM Compiler based on Clang (arm.com)
4762 Bruce = Bruce C Compiler
4763 CCur = Concurrent Fortran (ccur.com)
4764 Clang = LLVM Clang (clang.llvm.org)
4765 Cray = Cray Compiler (cray.com)
4766 Embarcadero, Borland = Embarcadero (embarcadero.com)
4767 Flang = Flang LLVM Fortran Compiler
4768 G95 = G95 Fortran (g95.org)
4769 GNU = GNU Compiler Collection (gcc.gnu.org)
4770 GHS = Green Hills Software (www.ghs.com)
4771 HP = Hewlett-Packard Compiler (hp.com)
4772 IAR = IAR Systems (iar.com)
4773 Intel = Intel Compiler (intel.com)
4774 MSVC = Microsoft Visual Studio (microsoft.com)
4775 NVIDIA = NVIDIA CUDA Compiler (nvidia.com)
4776 OpenWatcom = Open Watcom (openwatcom.org)
4777 PGI = The Portland Group (pgroup.com)
4778 PathScale = PathScale (pathscale.com)
4779 SDCC = Small Device C Compiler (sdcc.sourceforge.net)
4780 SunPro = Oracle Solaris Studio (oracle.com)
4781 TI = Texas Instruments (ti.com)
4782 TinyCC = Tiny C Compiler (tinycc.org)
4783 XL, VisualAge, zOS = IBM XL (ibm.com)
4784 XLClang = IBM Clang-based XL (ibm.com)
4785
4786 This variable is not guaranteed to be defined for all compilers or lan‐
4787 guages.
4788
4789 CMAKE_<LANG>_COMPILER_LOADED
4790 Defined to true if the language is enabled.
4791
4792 When language <LANG> is enabled by project() or enable_language() this
4793 variable is defined to 1.
4794
4795 CMAKE_<LANG>_COMPILER_PREDEFINES_COMMAND
4796 Command that outputs the compiler pre definitions.
4797
4798 See AUTOMOC which uses CMAKE_CXX_COMPILER_PREDEFINES_COMMAND to gener‐
4799 ate the AUTOMOC_COMPILER_PREDEFINES.
4800
4801 CMAKE_<LANG>_COMPILER_TARGET
4802 The target for cross-compiling, if supported.
4803
4804 Some compiler drivers are inherently cross-compilers, such as clang and
4805 QNX qcc. These compiler drivers support a command-line argument to
4806 specify the target to cross-compile for.
4807
4808 This variable may only be set in a toolchain file specified by the
4809 CMAKE_TOOLCHAIN_FILE variable.
4810
4811 CMAKE_<LANG>_COMPILER_VERSION
4812 Compiler version string.
4813
4814 Compiler version in major[.minor[.patch[.tweak]]] format. This vari‐
4815 able is not guaranteed to be defined for all compilers or languages.
4816
4817 For example CMAKE_C_COMPILER_VERSION and CMAKE_CXX_COMPILER_VERSION
4818 might indicate the respective C and C++ compiler version.
4819
4820 CMAKE_<LANG>_COMPILE_OBJECT
4821 Rule variable to compile a single object file.
4822
4823 This is a rule variable that tells CMake how to compile a single object
4824 file for the language <LANG>.
4825
4826 CMAKE_<LANG>_CREATE_SHARED_LIBRARY
4827 Rule variable to create a shared library.
4828
4829 This is a rule variable that tells CMake how to create a shared library
4830 for the language <LANG>. This rule variable is a ; delimited list of
4831 commands to run to perform the linking step.
4832
4833 CMAKE_<LANG>_CREATE_SHARED_MODULE
4834 Rule variable to create a shared module.
4835
4836 This is a rule variable that tells CMake how to create a shared library
4837 for the language <LANG>. This rule variable is a ; delimited list of
4838 commands to run.
4839
4840 CMAKE_<LANG>_CREATE_STATIC_LIBRARY
4841 Rule variable to create a static library.
4842
4843 This is a rule variable that tells CMake how to create a static library
4844 for the language <LANG>.
4845
4846 CMAKE_<LANG>_FLAGS
4847 Flags for all build types.
4848
4849 <LANG> flags used regardless of the value of CMAKE_BUILD_TYPE.
4850
4851 This is initialized for each language from environment variables:
4852
4853 · CMAKE_C_FLAGS: Initialized by the CFLAGS environment variable.
4854
4855 · CMAKE_CXX_FLAGS: Initialized by the CXXFLAGS environment variable.
4856
4857 · CMAKE_CUDA_FLAGS: Initialized by the CUDAFLAGS environment variable.
4858
4859 · CMAKE_Fortran_FLAGS: Initialized by the FFLAGS environment variable.
4860
4861 CMAKE_<LANG>_FLAGS_<CONFIG>
4862 Flags for language <LANG> when building for the <CONFIG> configuration.
4863
4864 CMAKE_<LANG>_FLAGS_<CONFIG>_INIT
4865 Value used to initialize the CMAKE_<LANG>_FLAGS_<CONFIG> cache entry
4866 the first time a build tree is configured for language <LANG>. This
4867 variable is meant to be set by a toolchain file. CMake may prepend or
4868 append content to the value based on the environment and target plat‐
4869 form.
4870
4871 See also CMAKE_<LANG>_FLAGS_INIT.
4872
4873 CMAKE_<LANG>_FLAGS_DEBUG
4874 This variable is the Debug variant of the CMAKE_<LANG>_FLAGS_<CONFIG>
4875 variable.
4876
4877 CMAKE_<LANG>_FLAGS_DEBUG_INIT
4878 This variable is the Debug variant of the CMAKE_<LANG>_FLAGS_<CON‐
4879 FIG>_INIT variable.
4880
4881 CMAKE_<LANG>_FLAGS_INIT
4882 Value used to initialize the CMAKE_<LANG>_FLAGS cache entry the first
4883 time a build tree is configured for language <LANG>. This variable is
4884 meant to be set by a toolchain file. CMake may prepend or append con‐
4885 tent to the value based on the environment and target platform.
4886
4887 See also the configuration-specific CMAKE_<LANG>_FLAGS_<CONFIG>_INIT
4888 variable.
4889
4890 CMAKE_<LANG>_FLAGS_MINSIZEREL
4891 This variable is the MinSizeRel variant of the CMAKE_<LANG>_FLAGS_<CON‐
4892 FIG> variable.
4893
4894 CMAKE_<LANG>_FLAGS_MINSIZEREL_INIT
4895 This variable is the MinSizeRel variant of the CMAKE_<LANG>_FLAGS_<CON‐
4896 FIG>_INIT variable.
4897
4898 CMAKE_<LANG>_FLAGS_RELEASE
4899 This variable is the Release variant of the CMAKE_<LANG>_FLAGS_<CONFIG>
4900 variable.
4901
4902 CMAKE_<LANG>_FLAGS_RELEASE_INIT
4903 This variable is the Release variant of the CMAKE_<LANG>_FLAGS_<CON‐
4904 FIG>_INIT variable.
4905
4906 CMAKE_<LANG>_FLAGS_RELWITHDEBINFO
4907 This variable is the RelWithDebInfo variant of the
4908 CMAKE_<LANG>_FLAGS_<CONFIG> variable.
4909
4910 CMAKE_<LANG>_FLAGS_RELWITHDEBINFO_INIT
4911 This variable is the RelWithDebInfo variant of the
4912 CMAKE_<LANG>_FLAGS_<CONFIG>_INIT variable.
4913
4914 CMAKE_<LANG>_IGNORE_EXTENSIONS
4915 File extensions that should be ignored by the build.
4916
4917 This is a list of file extensions that may be part of a project for a
4918 given language but are not compiled.
4919
4920 CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES
4921 Directories implicitly searched by the compiler for header files.
4922
4923 CMake does not explicitly specify these directories on compiler command
4924 lines for language <LANG>. This prevents system include directories
4925 from being treated as user include directories on some compilers, which
4926 is important for C, CXX, and CUDA to avoid overriding standard library
4927 headers.
4928
4929 This value is not used for Fortran because it has no standard library
4930 headers and some compilers do not search their implicit include direc‐
4931 tories for module .mod files.
4932
4933 CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES
4934 Implicit linker search path detected for language <LANG>.
4935
4936 Compilers typically pass directories containing language runtime
4937 libraries and default library search paths when they invoke a linker.
4938 These paths are implicit linker search directories for the compiler’s
4939 language. CMake automatically detects these directories for each lan‐
4940 guage and reports the results in this variable.
4941
4942 Some toolchains read implicit directories from an environment variable
4943 such as LIBRARY_PATH. If using such an environment variable, keep its
4944 value consistent when operating in a given build tree because CMake
4945 saves the value detected when first creating a build tree.
4946
4947 If policy CMP0060 is not set to NEW, then when a library in one of
4948 these directories is given by full path to target_link_libraries()
4949 CMake will generate the -l<name> form on link lines for historical pur‐
4950 poses.
4951
4952 CMAKE_<LANG>_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES
4953 Implicit linker framework search path detected for language <LANG>.
4954
4955 These paths are implicit linker framework search directories for the
4956 compiler’s language. CMake automatically detects these directories for
4957 each language and reports the results in this variable.
4958
4959 CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES
4960 Implicit link libraries and flags detected for language <LANG>.
4961
4962 Compilers typically pass language runtime library names and other flags
4963 when they invoke a linker. These flags are implicit link options for
4964 the compiler’s language. CMake automatically detects these libraries
4965 and flags for each language and reports the results in this variable.
4966
4967 CMAKE_<LANG>_LIBRARY_ARCHITECTURE
4968 Target architecture library directory name detected for <LANG>.
4969
4970 If the <LANG> compiler passes to the linker an architecture-specific
4971 system library search directory such as <prefix>/lib/<arch> this vari‐
4972 able contains the <arch> name if/as detected by CMake.
4973
4974 CMAKE_<LANG>_LINKER_PREFERENCE
4975 Preference value for linker language selection.
4976
4977 The “linker language” for executable, shared library, and module tar‐
4978 gets is the language whose compiler will invoke the linker. The
4979 LINKER_LANGUAGE target property sets the language explicitly. Other‐
4980 wise, the linker language is that whose linker preference value is
4981 highest among languages compiled and linked into the target. See also
4982 the CMAKE_<LANG>_LINKER_PREFERENCE_PROPAGATES variable.
4983
4984 CMAKE_<LANG>_LINKER_PREFERENCE_PROPAGATES
4985 True if CMAKE_<LANG>_LINKER_PREFERENCE propagates across targets.
4986
4987 This is used when CMake selects a linker language for a target. Lan‐
4988 guages compiled directly into the target are always considered. A lan‐
4989 guage compiled into static libraries linked by the target is considered
4990 if this variable is true.
4991
4992 CMAKE_<LANG>_LINKER_WRAPPER_FLAG
4993 Defines the syntax of compiler driver option to pass options to the
4994 linker tool. It will be used to translate the LINKER: prefix in the
4995 link options (see add_link_options() and target_link_options()).
4996
4997 This variable holds a semicolon-separated list of tokens. If a space
4998 (i.e. ” “) is specified as last token, flag and LINKER: arguments will
4999 be specified as separate arguments to the compiler driver. The
5000 CMAKE_<LANG>_LINKER_WRAPPER_FLAG_SEP variable can be specified to man‐
5001 age concatenation of arguments.
5002
5003 For example, for Clang we have:
5004
5005 set (CMAKE_C_LINKER_WRAPPER_FLAG "-Xlinker" " ")
5006
5007 Specifying "LINKER:-z,defs" will be transformed in -Xlinker -z -Xlinker
5008 defs.
5009
5010 For GNU GCC:
5011
5012 set (CMAKE_C_LINKER_WRAPPER_FLAG "-Wl,")
5013 set (CMAKE_C_LINKER_WRAPPER_FLAG_SEP ",")
5014
5015 Specifying "LINKER:-z,defs" will be transformed in -Wl,-z,defs.
5016
5017 And for SunPro:
5018
5019 set (CMAKE_C_LINKER_WRAPPER_FLAG "-Qoption" "ld" " ")
5020 set (CMAKE_C_LINKER_WRAPPER_FLAG_SEP ",")
5021
5022 Specifying "LINKER:-z,defs" will be transformed in -Qoption ld -z,defs.
5023
5024 CMAKE_<LANG>_LINKER_WRAPPER_FLAG_SEP
5025 This variable is used with CMAKE_<LANG>_LINKER_WRAPPER_FLAG variable to
5026 format LINKER: prefix in the link options (see add_link_options() and
5027 target_link_options()).
5028
5029 When specified, arguments of the LINKER: prefix will be concatenated
5030 using this value as separator.
5031
5032 CMAKE_<LANG>_LINK_EXECUTABLE
5033 Rule variable to link an executable.
5034
5035 Rule variable to link an executable for the given language.
5036
5037 CMAKE_<LANG>_OUTPUT_EXTENSION
5038 Extension for the output of a compile for a single file.
5039
5040 This is the extension for an object file for the given <LANG>. For
5041 example .obj for C on Windows.
5042
5043 CMAKE_<LANG>_SIMULATE_ID
5044 Identification string of “simulated” compiler.
5045
5046 Some compilers simulate other compilers to serve as drop-in replace‐
5047 ments. When CMake detects such a compiler it sets this variable to
5048 what would have been the CMAKE_<LANG>_COMPILER_ID for the simulated
5049 compiler.
5050
5051 CMAKE_<LANG>_SIMULATE_VERSION
5052 Version string of “simulated” compiler.
5053
5054 Some compilers simulate other compilers to serve as drop-in replace‐
5055 ments. When CMake detects such a compiler it sets this variable to
5056 what would have been the CMAKE_<LANG>_COMPILER_VERSION for the simu‐
5057 lated compiler.
5058
5059 CMAKE_<LANG>_SIZEOF_DATA_PTR
5060 Size of pointer-to-data types for language <LANG>.
5061
5062 This holds the size (in bytes) of pointer-to-data types in the target
5063 platform ABI. It is defined for languages C and CXX (C++).
5064
5065 CMAKE_<LANG>_SOURCE_FILE_EXTENSIONS
5066 Extensions of source files for the given language.
5067
5068 This is the list of extensions for a given language’s source files.
5069
5070 CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES
5071 Include directories to be used for every source file compiled with the
5072 <LANG> compiler. This is meant for specification of system include
5073 directories needed by the language for the current platform. The
5074 directories always appear at the end of the include path passed to the
5075 compiler.
5076
5077 This variable should not be set by project code. It is meant to be set
5078 by CMake’s platform information modules for the current toolchain, or
5079 by a toolchain file when used with CMAKE_TOOLCHAIN_FILE.
5080
5081 See also CMAKE_<LANG>_STANDARD_LIBRARIES.
5082
5083 CMAKE_<LANG>_STANDARD_LIBRARIES
5084 Libraries linked into every executable and shared library linked for
5085 language <LANG>. This is meant for specification of system libraries
5086 needed by the language for the current platform.
5087
5088 This variable should not be set by project code. It is meant to be set
5089 by CMake’s platform information modules for the current toolchain, or
5090 by a toolchain file when used with CMAKE_TOOLCHAIN_FILE.
5091
5092 See also CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES.
5093
5094 CMAKE_OBJC_EXTENSIONS
5095 Default value for OBJC_EXTENSIONS property of targets.
5096
5097 This variable is used to initialize the OBJC_EXTENSIONS property on all
5098 targets. See that target property for additional information.
5099
5100 See the cmake-compile-features(7) manual for information on compile
5101 features and a list of supported compilers.
5102
5103 CMAKE_OBJC_STANDARD
5104 Default value for OBJC_STANDARD property of targets.
5105
5106 This variable is used to initialize the OBJC_STANDARD property on all
5107 targets. See that target property for additional information.
5108
5109 See the cmake-compile-features(7) manual for information on compile
5110 features and a list of supported compilers.
5111
5112 CMAKE_OBJC_STANDARD_REQUIRED
5113 Default value for OBJC_STANDARD_REQUIRED property of targets.
5114
5115 This variable is used to initialize the OBJC_STANDARD_REQUIRED property
5116 on all targets. See that target property for additional information.
5117
5118 See the cmake-compile-features(7) manual for information on compile
5119 features and a list of supported compilers.
5120
5121 CMAKE_OBJCXX_EXTENSIONS
5122 Default value for OBJCXX_EXTENSIONS property of targets.
5123
5124 This variable is used to initialize the OBJCXX_EXTENSIONS property on
5125 all targets. See that target property for additional information.
5126
5127 See the cmake-compile-features(7) manual for information on compile
5128 features and a list of supported compilers.
5129
5130 CMAKE_OBJCXX_STANDARD
5131 Default value for OBJCXX_STANDARD property of targets.
5132
5133 This variable is used to initialize the OBJCXX_STANDARD property on all
5134 targets. See that target property for additional information.
5135
5136 See the cmake-compile-features(7) manual for information on compile
5137 features and a list of supported compilers.
5138
5139 CMAKE_OBJCXX_STANDARD_REQUIRED
5140 Default value for OBJCXX_STANDARD_REQUIRED property of targets.
5141
5142 This variable is used to initialize the OBJCXX_STANDARD_REQUIRED prop‐
5143 erty on all targets. See that target property for additional informa‐
5144 tion.
5145
5146 See the cmake-compile-features(7) manual for information on compile
5147 features and a list of supported compilers.
5148
5149 CMAKE_Swift_LANGUAGE_VERSION
5150 Set to the Swift language version number. If not set, the oldest
5151 legacy version known to be available in the host Xcode version is
5152 assumed:
5153
5154 · Swift 4.0 for Xcode 10.2 and above.
5155
5156 · Swift 3.0 for Xcode 8.3 and above.
5157
5158 · Swift 2.3 for Xcode 8.2 and below.
5159
5160 CMAKE_USER_MAKE_RULES_OVERRIDE_<LANG>
5161 Specify a CMake file that overrides platform information for <LANG>.
5162
5163 This is a language-specific version of CMAKE_USER_MAKE_RULES_OVERRIDE
5164 loaded only when enabling language <LANG>.
5165
5167 CTEST_BINARY_DIRECTORY
5168 Specify the CTest BuildDirectory setting in a ctest(1) dashboard client
5169 script.
5170
5171 CTEST_BUILD_COMMAND
5172 Specify the CTest MakeCommand setting in a ctest(1) dashboard client
5173 script.
5174
5175 CTEST_BUILD_NAME
5176 Specify the CTest BuildName setting in a ctest(1) dashboard client
5177 script.
5178
5179 CTEST_BZR_COMMAND
5180 Specify the CTest BZRCommand setting in a ctest(1) dashboard client
5181 script.
5182
5183 CTEST_BZR_UPDATE_OPTIONS
5184 Specify the CTest BZRUpdateOptions setting in a ctest(1) dashboard
5185 client script.
5186
5187 CTEST_CHANGE_ID
5188 Specify the CTest ChangeId setting in a ctest(1) dashboard client
5189 script.
5190
5191 This setting allows CTest to pass arbitrary information about this
5192 build up to CDash. One use of this feature is to allow CDash to post
5193 comments on your pull request if anything goes wrong with your build.
5194
5195 CTEST_CHECKOUT_COMMAND
5196 Tell the ctest_start() command how to checkout or initialize the source
5197 directory in a ctest(1) dashboard client script.
5198
5199 CTEST_CONFIGURATION_TYPE
5200 Specify the CTest DefaultCTestConfigurationType setting in a ctest(1)
5201 dashboard client script.
5202
5203 If the configuration type is set via -C <cfg> from the command line
5204 then this variable is populated accordingly.
5205
5206 CTEST_CONFIGURE_COMMAND
5207 Specify the CTest ConfigureCommand setting in a ctest(1) dashboard
5208 client script.
5209
5210 CTEST_COVERAGE_COMMAND
5211 Specify the CTest CoverageCommand setting in a ctest(1) dashboard
5212 client script.
5213
5214 Cobertura
5215 Using Cobertura as the coverage generation within your multi-module
5216 Java project can generate a series of XML files.
5217
5218 The Cobertura Coverage parser expects to read the coverage data from a
5219 single XML file which contains the coverage data for all modules.
5220 Cobertura has a program with the ability to merge given cobertura.ser
5221 files and then another program to generate a combined XML file from the
5222 previous merged file. For command line testing, this can be done by
5223 hand prior to CTest looking for the coverage files. For script builds,
5224 set the CTEST_COVERAGE_COMMAND variable to point to a file which will
5225 perform these same steps, such as a .sh or .bat file.
5226
5227 set(CTEST_COVERAGE_COMMAND .../run-coverage-and-consolidate.sh)
5228
5229 where the run-coverage-and-consolidate.sh script is perhaps created by
5230 the configure_file() command and might contain the following code:
5231
5232 #!/usr/bin/env bash
5233 CoberturaFiles="$(find "/path/to/source" -name "cobertura.ser")"
5234 SourceDirs="$(find "/path/to/source" -name "java" -type d)"
5235 cobertura-merge --datafile coberturamerge.ser $CoberturaFiles
5236 cobertura-report --datafile coberturamerge.ser --destination . \
5237 --format xml $SourceDirs
5238
5239 The script uses find to capture the paths to all of the cobertura.ser
5240 files found below the project’s source directory. It keeps the list of
5241 files and supplies it as an argument to the cobertura-merge program.
5242 The --datafile argument signifies where the result of the merge will be
5243 kept.
5244
5245 The combined coberturamerge.ser file is then used to generate the XML
5246 report using the cobertura-report program. The call to the cober‐
5247 tura-report program requires some named arguments.
5248
5249 --datafila
5250 path to the merged .ser file
5251
5252 --destination
5253 path to put the output files(s)
5254
5255 --format
5256 file format to write output in: xml or html
5257
5258 The rest of the supplied arguments consist of the full paths to the
5259 /src/main/java directories of each module within the source tree. These
5260 directories are needed and should not be forgotten.
5261
5262 CTEST_COVERAGE_EXTRA_FLAGS
5263 Specify the CTest CoverageExtraFlags setting in a ctest(1) dashboard
5264 client script.
5265
5266 CTEST_CURL_OPTIONS
5267 Specify the CTest CurlOptions setting in a ctest(1) dashboard client
5268 script.
5269
5270 CTEST_CUSTOM_COVERAGE_EXCLUDE
5271 A list of regular expressions which will be used to exclude files by
5272 their path from coverage output by the ctest_coverage() command.
5273
5274 It is initialized by ctest(1), but may be edited in a CTestCustom file.
5275 See ctest_read_custom_files() documentation.
5276
5277 CTEST_CUSTOM_ERROR_EXCEPTION
5278 A list of regular expressions which will be used to exclude when
5279 detecting error messages in build outputs by the ctest_test() command.
5280
5281 It is initialized by ctest(1), but may be edited in a CTestCustom file.
5282 See ctest_read_custom_files() documentation.
5283
5284 CTEST_CUSTOM_ERROR_MATCH
5285 A list of regular expressions which will be used to detect error mes‐
5286 sages in build outputs by the ctest_test() command.
5287
5288 It is initialized by ctest(1), but may be edited in a CTestCustom file.
5289 See ctest_read_custom_files() documentation.
5290
5291 CTEST_CUSTOM_ERROR_POST_CONTEXT
5292 The number of lines to include as context which follow an error message
5293 by the ctest_test() command. The default is 10.
5294
5295 It is initialized by ctest(1), but may be edited in a CTestCustom file.
5296 See ctest_read_custom_files() documentation.
5297
5298 CTEST_CUSTOM_ERROR_PRE_CONTEXT
5299 The number of lines to include as context which precede an error mes‐
5300 sage by the ctest_test() command. The default is 10.
5301
5302 It is initialized by ctest(1), but may be edited in a CTestCustom file.
5303 See ctest_read_custom_files() documentation.
5304
5305 CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE
5306 When saving a failing test’s output, this is the maximum size, in
5307 bytes, that will be collected by the ctest_test() command. Defaults to
5308 307200 (300 KiB).
5309
5310 It is initialized by ctest(1), but may be edited in a CTestCustom file.
5311 See ctest_read_custom_files() documentation.
5312
5313 CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS
5314 The maximum number of errors in a single build step which will be
5315 detected. After this, the ctest_test() command will truncate the out‐
5316 put. Defaults to 50.
5317
5318 It is initialized by ctest(1), but may be edited in a CTestCustom file.
5319 See ctest_read_custom_files() documentation.
5320
5321 CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS
5322 The maximum number of warnings in a single build step which will be
5323 detected. After this, the ctest_test() command will truncate the out‐
5324 put. Defaults to 50.
5325
5326 It is initialized by ctest(1), but may be edited in a CTestCustom file.
5327 See ctest_read_custom_files() documentation.
5328
5329 CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE
5330 When saving a passing test’s output, this is the maximum size, in
5331 bytes, that will be collected by the ctest_test() command. Defaults to
5332 1024 (1 KiB).
5333
5334 It is initialized by ctest(1), but may be edited in a CTestCustom file.
5335 See ctest_read_custom_files() documentation.
5336
5337 CTEST_CUSTOM_MEMCHECK_IGNORE
5338 A list of regular expressions to use to exclude tests during the
5339 ctest_memcheck() command.
5340
5341 It is initialized by ctest(1), but may be edited in a CTestCustom file.
5342 See ctest_read_custom_files() documentation.
5343
5344 CTEST_CUSTOM_POST_MEMCHECK
5345 A list of commands to run at the end of the ctest_memcheck() command.
5346
5347 It is initialized by ctest(1), but may be edited in a CTestCustom file.
5348 See ctest_read_custom_files() documentation.
5349
5350 CTEST_CUSTOM_POST_TEST
5351 A list of commands to run at the end of the ctest_test() command.
5352
5353 It is initialized by ctest(1), but may be edited in a CTestCustom file.
5354 See ctest_read_custom_files() documentation.
5355
5356 CTEST_CUSTOM_PRE_MEMCHECK
5357 A list of commands to run at the start of the ctest_memcheck() command.
5358
5359 It is initialized by ctest(1), but may be edited in a CTestCustom file.
5360 See ctest_read_custom_files() documentation.
5361
5362 CTEST_CUSTOM_PRE_TEST
5363 A list of commands to run at the start of the ctest_test() command.
5364
5365 It is initialized by ctest(1), but may be edited in a CTestCustom file.
5366 See ctest_read_custom_files() documentation.
5367
5368 CTEST_CUSTOM_TESTS_IGNORE
5369 A list of regular expressions to use to exclude tests during the
5370 ctest_test() command.
5371
5372 It is initialized by ctest(1), but may be edited in a CTestCustom file.
5373 See ctest_read_custom_files() documentation.
5374
5375 CTEST_CUSTOM_WARNING_EXCEPTION
5376 A list of regular expressions which will be used to exclude when
5377 detecting warning messages in build outputs by the ctest_build() com‐
5378 mand.
5379
5380 It is initialized by ctest(1), but may be edited in a CTestCustom file.
5381 See ctest_read_custom_files() documentation.
5382
5383 CTEST_CUSTOM_WARNING_MATCH
5384 A list of regular expressions which will be used to detect warning mes‐
5385 sages in build outputs by the ctest_build() command.
5386
5387 It is initialized by ctest(1), but may be edited in a CTestCustom file.
5388 See ctest_read_custom_files() documentation.
5389
5390 CTEST_CVS_CHECKOUT
5391 Deprecated. Use CTEST_CHECKOUT_COMMAND instead.
5392
5393 CTEST_CVS_COMMAND
5394 Specify the CTest CVSCommand setting in a ctest(1) dashboard client
5395 script.
5396
5397 CTEST_CVS_UPDATE_OPTIONS
5398 Specify the CTest CVSUpdateOptions setting in a ctest(1) dashboard
5399 client script.
5400
5401 CTEST_DROP_LOCATION
5402 Specify the CTest DropLocation setting in a ctest(1) dashboard client
5403 script.
5404
5405 CTEST_DROP_METHOD
5406 Specify the CTest DropMethod setting in a ctest(1) dashboard client
5407 script.
5408
5409 CTEST_DROP_SITE
5410 Specify the CTest DropSite setting in a ctest(1) dashboard client
5411 script.
5412
5413 CTEST_DROP_SITE_CDASH
5414 Specify the CTest IsCDash setting in a ctest(1) dashboard client
5415 script.
5416
5417 CTEST_DROP_SITE_PASSWORD
5418 Specify the CTest DropSitePassword setting in a ctest(1) dashboard
5419 client script.
5420
5421 CTEST_DROP_SITE_USER
5422 Specify the CTest DropSiteUser setting in a ctest(1) dashboard client
5423 script.
5424
5425 CTEST_EXTRA_COVERAGE_GLOB
5426 A list of regular expressions which will be used to find files which
5427 should be covered by the ctest_coverage() command.
5428
5429 It is initialized by ctest(1), but may be edited in a CTestCustom file.
5430 See ctest_read_custom_files() documentation.
5431
5432 CTEST_GIT_COMMAND
5433 Specify the CTest GITCommand setting in a ctest(1) dashboard client
5434 script.
5435
5436 CTEST_GIT_INIT_SUBMODULES
5437 Specify the CTest GITInitSubmodules setting in a ctest(1) dashboard
5438 client script.
5439
5440 CTEST_GIT_UPDATE_CUSTOM
5441 Specify the CTest GITUpdateCustom setting in a ctest(1) dashboard
5442 client script.
5443
5444 CTEST_GIT_UPDATE_OPTIONS
5445 Specify the CTest GITUpdateOptions setting in a ctest(1) dashboard
5446 client script.
5447
5448 CTEST_HG_COMMAND
5449 Specify the CTest HGCommand setting in a ctest(1) dashboard client
5450 script.
5451
5452 CTEST_HG_UPDATE_OPTIONS
5453 Specify the CTest HGUpdateOptions setting in a ctest(1) dashboard
5454 client script.
5455
5456 CTEST_LABELS_FOR_SUBPROJECTS
5457 Specify the CTest LabelsForSubprojects setting in a ctest(1) dashboard
5458 client script.
5459
5460 CTEST_MEMORYCHECK_COMMAND
5461 Specify the CTest MemoryCheckCommand setting in a ctest(1) dashboard
5462 client script.
5463
5464 CTEST_MEMORYCHECK_COMMAND_OPTIONS
5465 Specify the CTest MemoryCheckCommandOptions setting in a ctest(1) dash‐
5466 board client script.
5467
5468 CTEST_MEMORYCHECK_SANITIZER_OPTIONS
5469 Specify the CTest MemoryCheckSanitizerOptions setting in a ctest(1)
5470 dashboard client script.
5471
5472 CTEST_MEMORYCHECK_SUPPRESSIONS_FILE
5473 Specify the CTest MemoryCheckSuppressionFile setting in a ctest(1)
5474 dashboard client script.
5475
5476 CTEST_MEMORYCHECK_TYPE
5477 Specify the CTest MemoryCheckType setting in a ctest(1) dashboard
5478 client script. Valid values are Valgrind, Purify, BoundsChecker,
5479 DrMemory and ThreadSanitizer, AddressSanitizer, LeakSanitizer, Memo‐
5480 rySanitizer, and UndefinedBehaviorSanitizer.
5481
5482 CTEST_NIGHTLY_START_TIME
5483 Specify the CTest NightlyStartTime setting in a ctest(1) dashboard
5484 client script.
5485
5486 CTEST_P4_CLIENT
5487 Specify the CTest P4Client setting in a ctest(1) dashboard client
5488 script.
5489
5490 CTEST_P4_COMMAND
5491 Specify the CTest P4Command setting in a ctest(1) dashboard client
5492 script.
5493
5494 CTEST_P4_OPTIONS
5495 Specify the CTest P4Options setting in a ctest(1) dashboard client
5496 script.
5497
5498 CTEST_P4_UPDATE_OPTIONS
5499 Specify the CTest P4UpdateOptions setting in a ctest(1) dashboard
5500 client script.
5501
5502 CTEST_RUN_CURRENT_SCRIPT
5503 Setting this to 0 prevents ctest(1) from being run again when it
5504 reaches the end of a script run by calling ctest -S.
5505
5506 CTEST_SCP_COMMAND
5507 Legacy option. Not used.
5508
5509 CTEST_SITE
5510 Specify the CTest Site setting in a ctest(1) dashboard client script.
5511
5512 CTEST_SUBMIT_URL
5513 Specify the CTest SubmitURL setting in a ctest(1) dashboard client
5514 script.
5515
5516 CTEST_SOURCE_DIRECTORY
5517 Specify the CTest SourceDirectory setting in a ctest(1) dashboard
5518 client script.
5519
5520 CTEST_SVN_COMMAND
5521 Specify the CTest SVNCommand setting in a ctest(1) dashboard client
5522 script.
5523
5524 CTEST_SVN_OPTIONS
5525 Specify the CTest SVNOptions setting in a ctest(1) dashboard client
5526 script.
5527
5528 CTEST_SVN_UPDATE_OPTIONS
5529 Specify the CTest SVNUpdateOptions setting in a ctest(1) dashboard
5530 client script.
5531
5532 CTEST_TEST_LOAD
5533 Specify the TestLoad setting in the CTest Test Step of a ctest(1) dash‐
5534 board client script. This sets the default value for the TEST_LOAD
5535 option of the ctest_test() command.
5536
5537 CTEST_TEST_TIMEOUT
5538 Specify the CTest TimeOut setting in a ctest(1) dashboard client
5539 script.
5540
5541 CTEST_TRIGGER_SITE
5542 Legacy option. Not used.
5543
5544 CTEST_UPDATE_COMMAND
5545 Specify the CTest UpdateCommand setting in a ctest(1) dashboard client
5546 script.
5547
5548 CTEST_UPDATE_OPTIONS
5549 Specify the CTest UpdateOptions setting in a ctest(1) dashboard client
5550 script.
5551
5552 CTEST_UPDATE_VERSION_ONLY
5553 Specify the CTest UpdateVersionOnly setting in a ctest(1) dashboard
5554 client script.
5555
5556 CTEST_UPDATE_VERSION_OVERRIDE
5557 Specify the CTest UpdateVersionOverride setting in a ctest(1) dashboard
5558 client script.
5559
5560 CTEST_USE_LAUNCHERS
5561 Specify the CTest UseLaunchers setting in a ctest(1) dashboard client
5562 script.
5563
5565 CPACK_ABSOLUTE_DESTINATION_FILES
5566 List of files which have been installed using an ABSOLUTE DESTINATION
5567 path.
5568
5569 This variable is a Read-Only variable which is set internally by CPack
5570 during installation and before packaging using CMAKE_ABSOLUTE_DESTINA‐
5571 TION_FILES defined in cmake_install.cmake scripts. The value can be
5572 used within CPack project configuration file and/or CPack<GEN>.cmake
5573 file of <GEN> generator.
5574
5575 CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY
5576 Boolean toggle to include/exclude top level directory (component case).
5577
5578 Similar usage as CPACK_INCLUDE_TOPLEVEL_DIRECTORY but for the component
5579 case. See CPACK_INCLUDE_TOPLEVEL_DIRECTORY documentation for the
5580 detail.
5581
5582 CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION
5583 Ask CPack to error out as soon as a file with absolute INSTALL DESTINA‐
5584 TION is encountered.
5585
5586 The fatal error is emitted before the installation of the offending
5587 file takes place. Some CPack generators, like NSIS, enforce this
5588 internally. This variable triggers the definition of
5589 CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION when CPack runs.
5590
5591 CPACK_INCLUDE_TOPLEVEL_DIRECTORY
5592 Boolean toggle to include/exclude top level directory.
5593
5594 When preparing a package CPack installs the item under the so-called
5595 top level directory. The purpose of is to include (set to 1 or ON or
5596 TRUE) the top level directory in the package or not (set to 0 or OFF or
5597 FALSE).
5598
5599 Each CPack generator has a built-in default value for this variable.
5600 E.g. Archive generators (ZIP, TGZ, …) includes the top level whereas
5601 RPM or DEB don’t. The user may override the default value by setting
5602 this variable.
5603
5604 There is a similar variable CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY
5605 which may be used to override the behavior for the component packaging
5606 case which may have different default value for historical (now back‐
5607 ward compatibility) reason.
5608
5609 CPACK_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS
5610 Default permissions for implicitly created directories during packag‐
5611 ing.
5612
5613 This variable serves the same purpose during packaging as the
5614 CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS variable serves during
5615 installation (e.g. make install).
5616
5617 If include(CPack) is used then by default this variable is set to the
5618 content of CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS.
5619
5620 CPACK_PACKAGING_INSTALL_PREFIX
5621 The prefix used in the built package.
5622
5623 Each CPack generator has a default value (like /usr). This default
5624 value may be overwritten from the CMakeLists.txt or the cpack(1) com‐
5625 mand line by setting an alternative value. Example:
5626
5627 set(CPACK_PACKAGING_INSTALL_PREFIX "/opt")
5628
5629 This is not the same purpose as CMAKE_INSTALL_PREFIX which is used when
5630 installing from the build tree without building a package.
5631
5632 CPACK_SET_DESTDIR
5633 Boolean toggle to make CPack use DESTDIR mechanism when packaging.
5634
5635 DESTDIR means DESTination DIRectory. It is commonly used by makefile
5636 users in order to install software at non-default location. It is a
5637 basic relocation mechanism that should not be used on Windows (see
5638 CMAKE_INSTALL_PREFIX documentation). It is usually invoked like this:
5639
5640 make DESTDIR=/home/john install
5641
5642 which will install the concerned software using the installation pre‐
5643 fix, e.g. /usr/local prepended with the DESTDIR value which finally
5644 gives /home/john/usr/local. When preparing a package, CPack first
5645 installs the items to be packaged in a local (to the build tree) direc‐
5646 tory by using the same DESTDIR mechanism. Nevertheless, if
5647 CPACK_SET_DESTDIR is set then CPack will set DESTDIR before doing the
5648 local install. The most noticeable difference is that without
5649 CPACK_SET_DESTDIR, CPack uses CPACK_PACKAGING_INSTALL_PREFIX as a pre‐
5650 fix whereas with CPACK_SET_DESTDIR set, CPack will use
5651 CMAKE_INSTALL_PREFIX as a prefix.
5652
5653 Manually setting CPACK_SET_DESTDIR may help (or simply be necessary) if
5654 some install rules uses absolute DESTINATION (see CMake install() com‐
5655 mand). However, starting with CPack/CMake 2.8.3 RPM and DEB installers
5656 tries to handle DESTDIR automatically so that it is seldom necessary
5657 for the user to set it.
5658
5659 CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION
5660 Ask CPack to warn each time a file with absolute INSTALL DESTINATION is
5661 encountered.
5662
5663 This variable triggers the definition of CMAKE_WARN_ON_ABSO‐
5664 LUTE_INSTALL_DESTINATION when CPack runs cmake_install.cmake scripts.
5665
5667 CACHE
5668 Operator to read cache variables.
5669
5670 Use the syntax $CACHE{VAR} to read cache entry VAR. See the cmake-lan‐
5671 guage(7) variables documentation for more complete documentation of the
5672 interaction of normal variables and cache entries.
5673
5674 When evaluating Variable References of the form ${VAR}, CMake first
5675 searches for a normal variable with that name, and if not found CMake
5676 will search for a cache entry with that name. The $CACHE{VAR} syntax
5677 can be used to do direct cache lookup and ignore any existing normal
5678 variable.
5679
5680 See the set() and unset() commands to see how to write or remove cache
5681 variables.
5682
5683 ENV
5684 Operator to read environment variables.
5685
5686 Use the syntax $ENV{VAR} to read environment variable VAR.
5687
5688 To test whether an environment variable is defined, use the signature
5689 if(DEFINED ENV{<name>}) of the if() command.
5690
5691 See the set() and unset() commands to see how to write or remove envi‐
5692 ronment variables.
5693
5695 CMake has many internal variables. Most of them are undocumented.
5696 Some of them, however, were at some point described as normal vari‐
5697 ables, and therefore may be encountered in legacy code. They are sub‐
5698 ject to change, and not recommended for use in project code.
5699
5700 CMAKE_HOME_DIRECTORY
5701 Path to top of source tree. Same as CMAKE_SOURCE_DIR.
5702
5703 This is an internal cache entry used to locate the source directory
5704 when loading a CMakeCache.txt from a build tree. It should not be used
5705 in project code. The variable CMAKE_SOURCE_DIR has the same value and
5706 should be preferred.
5707
5708 CMAKE_INTERNAL_PLATFORM_ABI
5709 An internal variable subject to change.
5710
5711 This is used in determining the compiler ABI and is subject to change.
5712
5713 CMAKE_<LANG>_COMPILER_ABI
5714 An internal variable subject to change.
5715
5716 This is used in determining the compiler ABI and is subject to change.
5717
5718 CMAKE_<LANG>_COMPILER_ARCHITECTURE_ID
5719 An internal variable subject to change.
5720
5721 This is used to identify the variant of a compiler based on its target
5722 architecture. For some compilers this is needed to determine the cor‐
5723 rect usage.
5724
5725 CMAKE_<LANG>_COMPILER_VERSION_INTERNAL
5726 An internal variable subject to change.
5727
5728 This is used to identify the variant of a compiler based on an internal
5729 version number. For some compilers this is needed to determine the
5730 correct usage.
5731
5732 CMAKE_<LANG>_PLATFORM_ID
5733 An internal variable subject to change.
5734
5735 This is used in determining the platform and is subject to change.
5736
5737 CMAKE_NOT_USING_CONFIG_FLAGS
5738 Skip _BUILD_TYPE flags if true.
5739
5740 This is an internal flag used by the generators in CMake to tell CMake
5741 to skip the _BUILD_TYPE flags.
5742
5743 CMAKE_VS_INTEL_Fortran_PROJECT_VERSION
5744 When generating for Visual Studio 9 2008 or greater with the Intel For‐
5745 tran plugin installed, this specifies the .vfproj project file format
5746 version. This is intended for internal use by CMake and should not be
5747 used by project code.
5748
5750 2000-2020 Kitware, Inc. and Contributors
5751
5752
5753
5754
57553.17.2 Apr 28, 2020 CMAKE-VARIABLES(7)