cmake-variables.7.rst 22.9 KB
Newer Older
1 2
.. cmake-manual-description: CMake Variables Reference

3 4 5
cmake-variables(7)
******************

6
.. only:: html
7 8 9

   .. contents::

10
This page documents variables that are provided by CMake
11 12 13 14 15 16 17
or have meaning to CMake when set by project code.

For general information on variables, see the
:ref:`Variables <CMake Language Variables>`
section in the cmake-language manual.


18 19 20 21
Variables that Provide Information
==================================

.. toctree::
22 23
   :maxdepth: 1

24
   /variable/CMAKE_AR
25 26 27 28 29 30 31 32 33 34
   /variable/CMAKE_ARGC
   /variable/CMAKE_ARGV0
   /variable/CMAKE_BINARY_DIR
   /variable/CMAKE_BUILD_TOOL
   /variable/CMAKE_CACHEFILE_DIR
   /variable/CMAKE_CACHE_MAJOR_VERSION
   /variable/CMAKE_CACHE_MINOR_VERSION
   /variable/CMAKE_CACHE_PATCH_VERSION
   /variable/CMAKE_CFG_INTDIR
   /variable/CMAKE_COMMAND
35
   /variable/CMAKE_CPACK_COMMAND
36
   /variable/CMAKE_CROSSCOMPILING
37
   /variable/CMAKE_CROSSCOMPILING_EMULATOR
38 39 40 41 42 43
   /variable/CMAKE_CTEST_COMMAND
   /variable/CMAKE_CURRENT_BINARY_DIR
   /variable/CMAKE_CURRENT_LIST_DIR
   /variable/CMAKE_CURRENT_LIST_FILE
   /variable/CMAKE_CURRENT_LIST_LINE
   /variable/CMAKE_CURRENT_SOURCE_DIR
44
   /variable/CMAKE_DIRECTORY_LABELS
45
   /variable/CMAKE_DL_LIBS
46
   /variable/CMAKE_DOTNET_TARGET_FRAMEWORK_VERSION
47 48 49 50
   /variable/CMAKE_EDIT_COMMAND
   /variable/CMAKE_EXECUTABLE_SUFFIX
   /variable/CMAKE_EXTRA_GENERATOR
   /variable/CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES
51
   /variable/CMAKE_FIND_PACKAGE_NAME
52 53
   /variable/CMAKE_FIND_PACKAGE_SORT_DIRECTION
   /variable/CMAKE_FIND_PACKAGE_SORT_ORDER
54
   /variable/CMAKE_GENERATOR
55
   /variable/CMAKE_GENERATOR_INSTANCE
56
   /variable/CMAKE_GENERATOR_PLATFORM
57 58 59
   /variable/CMAKE_GENERATOR_TOOLSET
   /variable/CMAKE_IMPORT_LIBRARY_PREFIX
   /variable/CMAKE_IMPORT_LIBRARY_SUFFIX
60 61
   /variable/CMAKE_JOB_POOL_COMPILE
   /variable/CMAKE_JOB_POOL_LINK
62
   /variable/CMAKE_JOB_POOLS
63 64
   /variable/CMAKE_LANG_COMPILER_AR
   /variable/CMAKE_LANG_COMPILER_RANLIB
65
   /variable/CMAKE_LINK_LIBRARY_SUFFIX
66 67
   /variable/CMAKE_LINK_SEARCH_END_STATIC
   /variable/CMAKE_LINK_SEARCH_START_STATIC
68 69
   /variable/CMAKE_MAJOR_VERSION
   /variable/CMAKE_MAKE_PROGRAM
70
   /variable/CMAKE_MATCH_COUNT
71
   /variable/CMAKE_MATCH_n
72
   /variable/CMAKE_MESSAGE_INDENT
73 74
   /variable/CMAKE_MINIMUM_REQUIRED_VERSION
   /variable/CMAKE_MINOR_VERSION
75 76
   /variable/CMAKE_NETRC
   /variable/CMAKE_NETRC_FILE
77 78
   /variable/CMAKE_PARENT_LIST_FILE
   /variable/CMAKE_PATCH_VERSION
79
   /variable/CMAKE_PROJECT_DESCRIPTION
80
   /variable/CMAKE_PROJECT_HOMEPAGE_URL
81
   /variable/CMAKE_PROJECT_NAME
82 83 84 85 86
   /variable/CMAKE_PROJECT_VERSION
   /variable/CMAKE_PROJECT_VERSION_MAJOR
   /variable/CMAKE_PROJECT_VERSION_MINOR
   /variable/CMAKE_PROJECT_VERSION_PATCH
   /variable/CMAKE_PROJECT_VERSION_TWEAK
87 88
   /variable/CMAKE_RANLIB
   /variable/CMAKE_ROOT
89
   /variable/CMAKE_RULE_MESSAGES
90 91 92 93 94 95
   /variable/CMAKE_SCRIPT_MODE_FILE
   /variable/CMAKE_SHARED_LIBRARY_PREFIX
   /variable/CMAKE_SHARED_LIBRARY_SUFFIX
   /variable/CMAKE_SHARED_MODULE_PREFIX
   /variable/CMAKE_SHARED_MODULE_SUFFIX
   /variable/CMAKE_SIZEOF_VOID_P
96
   /variable/CMAKE_SKIP_INSTALL_RULES
97 98 99 100
   /variable/CMAKE_SKIP_RPATH
   /variable/CMAKE_SOURCE_DIR
   /variable/CMAKE_STATIC_LIBRARY_PREFIX
   /variable/CMAKE_STATIC_LIBRARY_SUFFIX
101
   /variable/CMAKE_Swift_MODULE_DIRECTORY
102
   /variable/CMAKE_Swift_NUM_THREADS
103
   /variable/CMAKE_TOOLCHAIN_FILE
104 105 106
   /variable/CMAKE_TWEAK_VERSION
   /variable/CMAKE_VERBOSE_MAKEFILE
   /variable/CMAKE_VERSION
107 108
   /variable/CMAKE_VS_DEVENV_COMMAND
   /variable/CMAKE_VS_MSBUILD_COMMAND
109
   /variable/CMAKE_VS_NsightTegra_VERSION
110
   /variable/CMAKE_VS_PLATFORM_NAME
111
   /variable/CMAKE_VS_PLATFORM_NAME_DEFAULT
112
   /variable/CMAKE_VS_PLATFORM_TOOLSET
113
   /variable/CMAKE_VS_PLATFORM_TOOLSET_CUDA
114
   /variable/CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE
115
   /variable/CMAKE_VS_PLATFORM_TOOLSET_VERSION
116
   /variable/CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION
117
   /variable/CMAKE_XCODE_GENERATE_SCHEME
118 119
   /variable/CMAKE_XCODE_PLATFORM_TOOLSET
   /variable/PROJECT-NAME_BINARY_DIR
120
   /variable/PROJECT-NAME_DESCRIPTION
121
   /variable/PROJECT-NAME_HOMEPAGE_URL
122
   /variable/PROJECT-NAME_SOURCE_DIR
123 124 125 126 127
   /variable/PROJECT-NAME_VERSION
   /variable/PROJECT-NAME_VERSION_MAJOR
   /variable/PROJECT-NAME_VERSION_MINOR
   /variable/PROJECT-NAME_VERSION_PATCH
   /variable/PROJECT-NAME_VERSION_TWEAK
128
   /variable/PROJECT_BINARY_DIR
129
   /variable/PROJECT_DESCRIPTION
130
   /variable/PROJECT_HOMEPAGE_URL
131
   /variable/PROJECT_NAME
132
   /variable/PROJECT_SOURCE_DIR
133 134 135 136 137
   /variable/PROJECT_VERSION
   /variable/PROJECT_VERSION_MAJOR
   /variable/PROJECT_VERSION_MINOR
   /variable/PROJECT_VERSION_PATCH
   /variable/PROJECT_VERSION_TWEAK
138 139 140 141 142

Variables that Change Behavior
==============================

.. toctree::
143 144
   :maxdepth: 1

145 146
   /variable/BUILD_SHARED_LIBS
   /variable/CMAKE_ABSOLUTE_DESTINATION_FILES
147
   /variable/CMAKE_APPBUNDLE_PATH
148 149 150
   /variable/CMAKE_AUTOMOC_RELAXED_MODE
   /variable/CMAKE_BACKWARDS_COMPATIBILITY
   /variable/CMAKE_BUILD_TYPE
151
   /variable/CMAKE_CODEBLOCKS_COMPILER_ID
152
   /variable/CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES
153
   /variable/CMAKE_CODELITE_USE_TARGETS
154 155 156
   /variable/CMAKE_COLOR_MAKEFILE
   /variable/CMAKE_CONFIGURATION_TYPES
   /variable/CMAKE_DEBUG_TARGET_PROPERTIES
157
   /variable/CMAKE_DEPENDS_IN_PROJECT_ONLY
158
   /variable/CMAKE_DISABLE_FIND_PACKAGE_PackageName
159 160 161
   /variable/CMAKE_ECLIPSE_GENERATE_LINKED_RESOURCES
   /variable/CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT
   /variable/CMAKE_ECLIPSE_MAKE_ARGUMENTS
162
   /variable/CMAKE_ECLIPSE_RESOURCE_ENCODING
163
   /variable/CMAKE_ECLIPSE_VERSION
164 165
   /variable/CMAKE_ERROR_DEPRECATED
   /variable/CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION
166
   /variable/CMAKE_EXECUTE_PROCESS_COMMAND_ECHO
167
   /variable/CMAKE_EXPORT_COMPILE_COMMANDS
168
   /variable/CMAKE_EXPORT_PACKAGE_REGISTRY
169
   /variable/CMAKE_EXPORT_NO_PACKAGE_REGISTRY
170 171
   /variable/CMAKE_FIND_APPBUNDLE
   /variable/CMAKE_FIND_FRAMEWORK
172
   /variable/CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX
173 174
   /variable/CMAKE_FIND_LIBRARY_PREFIXES
   /variable/CMAKE_FIND_LIBRARY_SUFFIXES
175
   /variable/CMAKE_FIND_NO_INSTALL_PREFIX
176 177
   /variable/CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY
   /variable/CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY
178
   /variable/CMAKE_FIND_PACKAGE_PREFER_CONFIG
179
   /variable/CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS
180 181 182 183 184 185
   /variable/CMAKE_FIND_PACKAGE_WARN_NO_MODULE
   /variable/CMAKE_FIND_ROOT_PATH
   /variable/CMAKE_FIND_ROOT_PATH_MODE_INCLUDE
   /variable/CMAKE_FIND_ROOT_PATH_MODE_LIBRARY
   /variable/CMAKE_FIND_ROOT_PATH_MODE_PACKAGE
   /variable/CMAKE_FIND_ROOT_PATH_MODE_PROGRAM
186 187 188
   /variable/CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH
   /variable/CMAKE_FIND_USE_CMAKE_PATH
   /variable/CMAKE_FIND_USE_CMAKE_SYSTEM_PATH
189
   /variable/CMAKE_FIND_USE_PACKAGE_REGISTRY
190
   /variable/CMAKE_FIND_USE_PACKAGE_ROOT_PATH
191
   /variable/CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH
192
   /variable/CMAKE_FRAMEWORK_PATH
193
   /variable/CMAKE_IGNORE_PATH
194 195
   /variable/CMAKE_INCLUDE_DIRECTORIES_BEFORE
   /variable/CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE
196
   /variable/CMAKE_INCLUDE_PATH
197
   /variable/CMAKE_INSTALL_DEFAULT_COMPONENT_NAME
198
   /variable/CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS
199
   /variable/CMAKE_INSTALL_MESSAGE
200
   /variable/CMAKE_INSTALL_PREFIX
201
   /variable/CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT
202
   /variable/CMAKE_LIBRARY_PATH
203
   /variable/CMAKE_LINK_DIRECTORIES_BEFORE
204
   /variable/CMAKE_MFC_FLAG
205
   /variable/CMAKE_MAXIMUM_RECURSION_DEPTH
206 207
   /variable/CMAKE_MODULE_PATH
   /variable/CMAKE_POLICY_DEFAULT_CMPNNNN
208
   /variable/CMAKE_POLICY_WARNING_CMPNNNN
209 210
   /variable/CMAKE_PREFIX_PATH
   /variable/CMAKE_PROGRAM_PATH
211
   /variable/CMAKE_PROJECT_INCLUDE
212
   /variable/CMAKE_PROJECT_INCLUDE_BEFORE
213
   /variable/CMAKE_PROJECT_PROJECT-NAME_INCLUDE
214
   /variable/CMAKE_SKIP_INSTALL_ALL_DEPENDENCY
215
   /variable/CMAKE_STAGING_PREFIX
216
   /variable/CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS
217
   /variable/CMAKE_SUBLIME_TEXT_2_EXCLUDE_BUILD_TREE
218
   /variable/CMAKE_SUPPRESS_REGENERATION
219
   /variable/CMAKE_SYSROOT
220 221
   /variable/CMAKE_SYSROOT_COMPILE
   /variable/CMAKE_SYSROOT_LINK
222
   /variable/CMAKE_SYSTEM_APPBUNDLE_PATH
223
   /variable/CMAKE_SYSTEM_FRAMEWORK_PATH
224 225 226 227 228 229 230 231
   /variable/CMAKE_SYSTEM_IGNORE_PATH
   /variable/CMAKE_SYSTEM_INCLUDE_PATH
   /variable/CMAKE_SYSTEM_LIBRARY_PATH
   /variable/CMAKE_SYSTEM_PREFIX_PATH
   /variable/CMAKE_SYSTEM_PROGRAM_PATH
   /variable/CMAKE_USER_MAKE_RULES_OVERRIDE
   /variable/CMAKE_WARN_DEPRECATED
   /variable/CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION
232
   /variable/CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY
233 234
   /variable/CMAKE_XCODE_SCHEME_ADDRESS_SANITIZER
   /variable/CMAKE_XCODE_SCHEME_ADDRESS_SANITIZER_USE_AFTER_RETURN
235 236 237 238 239 240 241 242
   /variable/CMAKE_XCODE_SCHEME_DISABLE_MAIN_THREAD_CHECKER
   /variable/CMAKE_XCODE_SCHEME_DYNAMIC_LIBRARY_LOADS
   /variable/CMAKE_XCODE_SCHEME_DYNAMIC_LINKER_API_USAGE
   /variable/CMAKE_XCODE_SCHEME_GUARD_MALLOC
   /variable/CMAKE_XCODE_SCHEME_MAIN_THREAD_CHECKER_STOP
   /variable/CMAKE_XCODE_SCHEME_MALLOC_GUARD_EDGES
   /variable/CMAKE_XCODE_SCHEME_MALLOC_SCRIBBLE
   /variable/CMAKE_XCODE_SCHEME_MALLOC_STACK
243 244 245 246 247
   /variable/CMAKE_XCODE_SCHEME_THREAD_SANITIZER
   /variable/CMAKE_XCODE_SCHEME_THREAD_SANITIZER_STOP
   /variable/CMAKE_XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER
   /variable/CMAKE_XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER_STOP
   /variable/CMAKE_XCODE_SCHEME_ZOMBIE_OBJECTS
248
   /variable/PackageName_ROOT
249 250 251 252 253

Variables that Describe the System
==================================

.. toctree::
254 255
   :maxdepth: 1

256
   /variable/ANDROID
257 258 259 260 261
   /variable/APPLE
   /variable/BORLAND
   /variable/CMAKE_CL_64
   /variable/CMAKE_COMPILER_2005
   /variable/CMAKE_HOST_APPLE
262
   /variable/CMAKE_HOST_SOLARIS
263
   /variable/CMAKE_HOST_SYSTEM
264 265 266 267 268 269
   /variable/CMAKE_HOST_SYSTEM_NAME
   /variable/CMAKE_HOST_SYSTEM_PROCESSOR
   /variable/CMAKE_HOST_SYSTEM_VERSION
   /variable/CMAKE_HOST_UNIX
   /variable/CMAKE_HOST_WIN32
   /variable/CMAKE_LIBRARY_ARCHITECTURE
270
   /variable/CMAKE_LIBRARY_ARCHITECTURE_REGEX
271
   /variable/CMAKE_OBJECT_PATH_MAX
272
   /variable/CMAKE_SYSTEM
273 274 275 276
   /variable/CMAKE_SYSTEM_NAME
   /variable/CMAKE_SYSTEM_PROCESSOR
   /variable/CMAKE_SYSTEM_VERSION
   /variable/CYGWIN
277
   /variable/GHS-MULTI
Ruslan Baratov's avatar
Ruslan Baratov committed
278
   /variable/IOS
279
   /variable/MINGW
280
   /variable/MSVC
281 282 283
   /variable/MSVC10
   /variable/MSVC11
   /variable/MSVC12
284
   /variable/MSVC14
285 286 287 288 289 290
   /variable/MSVC60
   /variable/MSVC70
   /variable/MSVC71
   /variable/MSVC80
   /variable/MSVC90
   /variable/MSVC_IDE
291
   /variable/MSVC_TOOLSET_VERSION
292
   /variable/MSVC_VERSION
293
   /variable/MSYS
294 295
   /variable/UNIX
   /variable/WIN32
296
   /variable/WINCE
297 298
   /variable/WINDOWS_PHONE
   /variable/WINDOWS_STORE
Ruslan Baratov's avatar
Ruslan Baratov committed
299
   /variable/XCODE
300 301 302 303 304 305
   /variable/XCODE_VERSION

Variables that Control the Build
================================

.. toctree::
306 307
   :maxdepth: 1

308
   /variable/CMAKE_ANDROID_ANT_ADDITIONAL_OPTIONS
309
   /variable/CMAKE_ANDROID_API
310
   /variable/CMAKE_ANDROID_API_MIN
311
   /variable/CMAKE_ANDROID_ARCH
312 313 314
   /variable/CMAKE_ANDROID_ARCH_ABI
   /variable/CMAKE_ANDROID_ARM_MODE
   /variable/CMAKE_ANDROID_ARM_NEON
315
   /variable/CMAKE_ANDROID_ASSETS_DIRECTORIES
316
   /variable/CMAKE_ANDROID_GUI
317 318 319 320 321
   /variable/CMAKE_ANDROID_JAR_DEPENDENCIES
   /variable/CMAKE_ANDROID_JAR_DIRECTORIES
   /variable/CMAKE_ANDROID_JAVA_SOURCE_DIR
   /variable/CMAKE_ANDROID_NATIVE_LIB_DEPENDENCIES
   /variable/CMAKE_ANDROID_NATIVE_LIB_DIRECTORIES
322
   /variable/CMAKE_ANDROID_NDK
323
   /variable/CMAKE_ANDROID_NDK_DEPRECATED_HEADERS
324
   /variable/CMAKE_ANDROID_NDK_TOOLCHAIN_HOST_TAG
325
   /variable/CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION
326 327 328 329 330
   /variable/CMAKE_ANDROID_PROCESS_MAX
   /variable/CMAKE_ANDROID_PROGUARD
   /variable/CMAKE_ANDROID_PROGUARD_CONFIG_PATH
   /variable/CMAKE_ANDROID_SECURE_PROPS_PATH
   /variable/CMAKE_ANDROID_SKIP_ANT_STEP
331
   /variable/CMAKE_ANDROID_STANDALONE_TOOLCHAIN
332
   /variable/CMAKE_ANDROID_STL_TYPE
333
   /variable/CMAKE_ARCHIVE_OUTPUT_DIRECTORY
334
   /variable/CMAKE_ARCHIVE_OUTPUT_DIRECTORY_CONFIG
335
   /variable/CMAKE_AUTOGEN_ORIGIN_DEPENDS
336
   /variable/CMAKE_AUTOGEN_PARALLEL
337
   /variable/CMAKE_AUTOGEN_VERBOSE
338
   /variable/CMAKE_AUTOMOC
339
   /variable/CMAKE_AUTOMOC_COMPILER_PREDEFINES
340
   /variable/CMAKE_AUTOMOC_DEPEND_FILTERS
341
   /variable/CMAKE_AUTOMOC_MACRO_NAMES
342
   /variable/CMAKE_AUTOMOC_MOC_OPTIONS
343 344
   /variable/CMAKE_AUTORCC
   /variable/CMAKE_AUTORCC_OPTIONS
345 346
   /variable/CMAKE_AUTOUIC
   /variable/CMAKE_AUTOUIC_OPTIONS
347
   /variable/CMAKE_AUTOUIC_SEARCH_PATHS
348
   /variable/CMAKE_BUILD_RPATH
349
   /variable/CMAKE_BUILD_RPATH_USE_ORIGIN
350
   /variable/CMAKE_BUILD_WITH_INSTALL_NAME_DIR
351
   /variable/CMAKE_BUILD_WITH_INSTALL_RPATH
352 353
   /variable/CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY
   /variable/CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY_CONFIG
354
   /variable/CMAKE_CONFIG_POSTFIX
355
   /variable/CMAKE_CUDA_SEPARABLE_COMPILATION
356
   /variable/CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS
357
   /variable/CMAKE_DEBUG_POSTFIX
358
   /variable/CMAKE_ENABLE_EXPORTS
359
   /variable/CMAKE_EXE_LINKER_FLAGS
360
   /variable/CMAKE_EXE_LINKER_FLAGS_CONFIG
361 362
   /variable/CMAKE_EXE_LINKER_FLAGS_CONFIG_INIT
   /variable/CMAKE_EXE_LINKER_FLAGS_INIT
363
   /variable/CMAKE_FOLDER
364
   /variable/CMAKE_FRAMEWORK
365 366
   /variable/CMAKE_Fortran_FORMAT
   /variable/CMAKE_Fortran_MODULE_DIRECTORY
367
   /variable/CMAKE_GHS_NO_SOURCE_GROUP_FILE
368 369 370 371
   /variable/CMAKE_GLOBAL_AUTOGEN_TARGET
   /variable/CMAKE_GLOBAL_AUTOGEN_TARGET_NAME
   /variable/CMAKE_GLOBAL_AUTORCC_TARGET
   /variable/CMAKE_GLOBAL_AUTORCC_TARGET_NAME
372 373
   /variable/CMAKE_GNUtoMS
   /variable/CMAKE_INCLUDE_CURRENT_DIR
374
   /variable/CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE
375
   /variable/CMAKE_INSTALL_NAME_DIR
376
   /variable/CMAKE_INSTALL_REMOVE_ENVIRONMENT_RPATH
377 378
   /variable/CMAKE_INSTALL_RPATH
   /variable/CMAKE_INSTALL_RPATH_USE_LINK_PATH
379
   /variable/CMAKE_INTERPROCEDURAL_OPTIMIZATION
380
   /variable/CMAKE_INTERPROCEDURAL_OPTIMIZATION_CONFIG
381
   /variable/CMAKE_IOS_INSTALL_COMBINED
382
   /variable/CMAKE_LANG_CLANG_TIDY
383
   /variable/CMAKE_LANG_COMPILER_LAUNCHER
384
   /variable/CMAKE_LANG_CPPCHECK
385
   /variable/CMAKE_LANG_CPPLINT
386
   /variable/CMAKE_LANG_INCLUDE_WHAT_YOU_USE
387
   /variable/CMAKE_LANG_LINK_LIBRARY_FLAG
388 389
   /variable/CMAKE_LANG_VISIBILITY_PRESET
   /variable/CMAKE_LIBRARY_OUTPUT_DIRECTORY
390
   /variable/CMAKE_LIBRARY_OUTPUT_DIRECTORY_CONFIG
391 392 393 394 395 396
   /variable/CMAKE_LIBRARY_PATH_FLAG
   /variable/CMAKE_LINK_DEF_FILE_FLAG
   /variable/CMAKE_LINK_DEPENDS_NO_SHARED
   /variable/CMAKE_LINK_INTERFACE_LIBRARIES
   /variable/CMAKE_LINK_LIBRARY_FILE_FLAG
   /variable/CMAKE_LINK_LIBRARY_FLAG
397
   /variable/CMAKE_LINK_WHAT_YOU_USE
398
   /variable/CMAKE_MACOSX_BUNDLE
399
   /variable/CMAKE_MACOSX_RPATH
400
   /variable/CMAKE_MAP_IMPORTED_CONFIG_CONFIG
401
   /variable/CMAKE_MODULE_LINKER_FLAGS
402
   /variable/CMAKE_MODULE_LINKER_FLAGS_CONFIG
403 404
   /variable/CMAKE_MODULE_LINKER_FLAGS_CONFIG_INIT
   /variable/CMAKE_MODULE_LINKER_FLAGS_INIT
405
   /variable/CMAKE_MSVCIDE_RUN_PATH
406
   /variable/CMAKE_MSVC_RUNTIME_LIBRARY
407
   /variable/CMAKE_NINJA_OUTPUT_PATH_PREFIX
408 409
   /variable/CMAKE_NO_BUILTIN_CHRPATH
   /variable/CMAKE_NO_SYSTEM_FROM_IMPORTED
410 411 412
   /variable/CMAKE_OSX_ARCHITECTURES
   /variable/CMAKE_OSX_DEPLOYMENT_TARGET
   /variable/CMAKE_OSX_SYSROOT
413
   /variable/CMAKE_PDB_OUTPUT_DIRECTORY
414
   /variable/CMAKE_PDB_OUTPUT_DIRECTORY_CONFIG
415 416
   /variable/CMAKE_POSITION_INDEPENDENT_CODE
   /variable/CMAKE_RUNTIME_OUTPUT_DIRECTORY
417
   /variable/CMAKE_RUNTIME_OUTPUT_DIRECTORY_CONFIG
418
   /variable/CMAKE_SHARED_LINKER_FLAGS
419
   /variable/CMAKE_SHARED_LINKER_FLAGS_CONFIG
420 421
   /variable/CMAKE_SHARED_LINKER_FLAGS_CONFIG_INIT
   /variable/CMAKE_SHARED_LINKER_FLAGS_INIT
422 423
   /variable/CMAKE_SKIP_BUILD_RPATH
   /variable/CMAKE_SKIP_INSTALL_RPATH
424
   /variable/CMAKE_STATIC_LINKER_FLAGS
425
   /variable/CMAKE_STATIC_LINKER_FLAGS_CONFIG
426 427
   /variable/CMAKE_STATIC_LINKER_FLAGS_CONFIG_INIT
   /variable/CMAKE_STATIC_LINKER_FLAGS_INIT
428
   /variable/CMAKE_TRY_COMPILE_CONFIGURATION
429
   /variable/CMAKE_TRY_COMPILE_PLATFORM_VARIABLES
430
   /variable/CMAKE_TRY_COMPILE_TARGET_TYPE
431 432
   /variable/CMAKE_USE_RELATIVE_PATHS
   /variable/CMAKE_VISIBILITY_INLINES_HIDDEN
433
   /variable/CMAKE_VS_GLOBALS
434
   /variable/CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD
435
   /variable/CMAKE_VS_INCLUDE_PACKAGE_TO_DEFAULT_BUILD
436
   /variable/CMAKE_VS_JUST_MY_CODE_DEBUGGING
437 438 439 440 441 442 443
   /variable/CMAKE_VS_SDK_EXCLUDE_DIRECTORIES
   /variable/CMAKE_VS_SDK_EXECUTABLE_DIRECTORIES
   /variable/CMAKE_VS_SDK_INCLUDE_DIRECTORIES
   /variable/CMAKE_VS_SDK_LIBRARY_DIRECTORIES
   /variable/CMAKE_VS_SDK_LIBRARY_WINRT_DIRECTORIES
   /variable/CMAKE_VS_SDK_REFERENCE_DIRECTORIES
   /variable/CMAKE_VS_SDK_SOURCE_DIRECTORIES
444
   /variable/CMAKE_VS_WINRT_BY_DEFAULT
445
   /variable/CMAKE_WIN32_EXECUTABLE
446
   /variable/CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS
447
   /variable/CMAKE_XCODE_ATTRIBUTE_an-attribute
448 449 450 451 452 453 454
   /variable/EXECUTABLE_OUTPUT_PATH
   /variable/LIBRARY_OUTPUT_PATH

Variables for Languages
=======================

.. toctree::
455 456
   :maxdepth: 1

457 458 459
   /variable/CMAKE_COMPILER_IS_GNUCC
   /variable/CMAKE_COMPILER_IS_GNUCXX
   /variable/CMAKE_COMPILER_IS_GNUG77
460
   /variable/CMAKE_CUDA_HOST_COMPILER
461 462 463
   /variable/CMAKE_CUDA_EXTENSIONS
   /variable/CMAKE_CUDA_STANDARD
   /variable/CMAKE_CUDA_STANDARD_REQUIRED
464
   /variable/CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES
465
   /variable/CMAKE_CXX_COMPILE_FEATURES
466
   /variable/CMAKE_CXX_EXTENSIONS
467
   /variable/CMAKE_CXX_STANDARD
468
   /variable/CMAKE_CXX_STANDARD_REQUIRED
469 470 471 472
   /variable/CMAKE_C_COMPILE_FEATURES
   /variable/CMAKE_C_EXTENSIONS
   /variable/CMAKE_C_STANDARD
   /variable/CMAKE_C_STANDARD_REQUIRED
473 474 475
   /variable/CMAKE_Fortran_MODDIR_DEFAULT
   /variable/CMAKE_Fortran_MODDIR_FLAG
   /variable/CMAKE_Fortran_MODOUT_FLAG
476
   /variable/CMAKE_LANG_ANDROID_TOOLCHAIN_MACHINE
477 478
   /variable/CMAKE_LANG_ANDROID_TOOLCHAIN_PREFIX
   /variable/CMAKE_LANG_ANDROID_TOOLCHAIN_SUFFIX
479 480 481
   /variable/CMAKE_LANG_ARCHIVE_APPEND
   /variable/CMAKE_LANG_ARCHIVE_CREATE
   /variable/CMAKE_LANG_ARCHIVE_FINISH
482 483
   /variable/CMAKE_LANG_COMPILER
   /variable/CMAKE_LANG_COMPILER_EXTERNAL_TOOLCHAIN
484 485
   /variable/CMAKE_LANG_COMPILER_ID
   /variable/CMAKE_LANG_COMPILER_LOADED
486
   /variable/CMAKE_LANG_COMPILER_PREDEFINES_COMMAND
487
   /variable/CMAKE_LANG_COMPILER_TARGET
488
   /variable/CMAKE_LANG_COMPILER_VERSION
489
   /variable/CMAKE_LANG_COMPILE_OBJECT
490 491 492
   /variable/CMAKE_LANG_CREATE_SHARED_LIBRARY
   /variable/CMAKE_LANG_CREATE_SHARED_MODULE
   /variable/CMAKE_LANG_CREATE_STATIC_LIBRARY
493
   /variable/CMAKE_LANG_FLAGS
494 495
   /variable/CMAKE_LANG_FLAGS_CONFIG
   /variable/CMAKE_LANG_FLAGS_CONFIG_INIT
496
   /variable/CMAKE_LANG_FLAGS_DEBUG
497
   /variable/CMAKE_LANG_FLAGS_DEBUG_INIT
498
   /variable/CMAKE_LANG_FLAGS_INIT
499
   /variable/CMAKE_LANG_FLAGS_MINSIZEREL
500
   /variable/CMAKE_LANG_FLAGS_MINSIZEREL_INIT
501
   /variable/CMAKE_LANG_FLAGS_RELEASE
502
   /variable/CMAKE_LANG_FLAGS_RELEASE_INIT
503
   /variable/CMAKE_LANG_FLAGS_RELWITHDEBINFO
504
   /variable/CMAKE_LANG_FLAGS_RELWITHDEBINFO_INIT
505 506 507 508 509 510 511
   /variable/CMAKE_LANG_IGNORE_EXTENSIONS
   /variable/CMAKE_LANG_IMPLICIT_INCLUDE_DIRECTORIES
   /variable/CMAKE_LANG_IMPLICIT_LINK_DIRECTORIES
   /variable/CMAKE_LANG_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES
   /variable/CMAKE_LANG_IMPLICIT_LINK_LIBRARIES
   /variable/CMAKE_LANG_LIBRARY_ARCHITECTURE
   /variable/CMAKE_LANG_LINKER_PREFERENCE
512
   /variable/CMAKE_LANG_LINKER_PREFERENCE_PROPAGATES
513 514
   /variable/CMAKE_LANG_LINKER_WRAPPER_FLAG
   /variable/CMAKE_LANG_LINKER_WRAPPER_FLAG_SEP
515 516 517 518 519 520
   /variable/CMAKE_LANG_LINK_EXECUTABLE
   /variable/CMAKE_LANG_OUTPUT_EXTENSION
   /variable/CMAKE_LANG_SIMULATE_ID
   /variable/CMAKE_LANG_SIMULATE_VERSION
   /variable/CMAKE_LANG_SIZEOF_DATA_PTR
   /variable/CMAKE_LANG_SOURCE_FILE_EXTENSIONS
521
   /variable/CMAKE_LANG_STANDARD_INCLUDE_DIRECTORIES
522
   /variable/CMAKE_LANG_STANDARD_LIBRARIES
523
   /variable/CMAKE_Swift_LANGUAGE_VERSION
524 525
   /variable/CMAKE_USER_MAKE_RULES_OVERRIDE_LANG

526 527 528 529 530 531 532 533 534 535 536
Variables for CTest
===================

.. toctree::
   :maxdepth: 1

   /variable/CTEST_BINARY_DIRECTORY
   /variable/CTEST_BUILD_COMMAND
   /variable/CTEST_BUILD_NAME
   /variable/CTEST_BZR_COMMAND
   /variable/CTEST_BZR_UPDATE_OPTIONS
537
   /variable/CTEST_CHANGE_ID
538 539 540 541 542 543
   /variable/CTEST_CHECKOUT_COMMAND
   /variable/CTEST_CONFIGURATION_TYPE
   /variable/CTEST_CONFIGURE_COMMAND
   /variable/CTEST_COVERAGE_COMMAND
   /variable/CTEST_COVERAGE_EXTRA_FLAGS
   /variable/CTEST_CURL_OPTIONS
544 545 546 547 548
   /variable/CTEST_CUSTOM_COVERAGE_EXCLUDE
   /variable/CTEST_CUSTOM_ERROR_EXCEPTION
   /variable/CTEST_CUSTOM_ERROR_MATCH
   /variable/CTEST_CUSTOM_ERROR_POST_CONTEXT
   /variable/CTEST_CUSTOM_ERROR_PRE_CONTEXT
549
   /variable/CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE
550 551
   /variable/CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS
   /variable/CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS
552
   /variable/CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE
553 554 555 556 557
   /variable/CTEST_CUSTOM_MEMCHECK_IGNORE
   /variable/CTEST_CUSTOM_POST_MEMCHECK
   /variable/CTEST_CUSTOM_POST_TEST
   /variable/CTEST_CUSTOM_PRE_MEMCHECK
   /variable/CTEST_CUSTOM_PRE_TEST
558
   /variable/CTEST_CUSTOM_TESTS_IGNORE
559 560
   /variable/CTEST_CUSTOM_WARNING_EXCEPTION
   /variable/CTEST_CUSTOM_WARNING_MATCH
561 562 563 564 565 566 567 568 569
   /variable/CTEST_CVS_CHECKOUT
   /variable/CTEST_CVS_COMMAND
   /variable/CTEST_CVS_UPDATE_OPTIONS
   /variable/CTEST_DROP_LOCATION
   /variable/CTEST_DROP_METHOD
   /variable/CTEST_DROP_SITE
   /variable/CTEST_DROP_SITE_CDASH
   /variable/CTEST_DROP_SITE_PASSWORD
   /variable/CTEST_DROP_SITE_USER
570
   /variable/CTEST_EXTRA_COVERAGE_GLOB
571
   /variable/CTEST_GIT_COMMAND
572
   /variable/CTEST_GIT_INIT_SUBMODULES
573 574 575 576
   /variable/CTEST_GIT_UPDATE_CUSTOM
   /variable/CTEST_GIT_UPDATE_OPTIONS
   /variable/CTEST_HG_COMMAND
   /variable/CTEST_HG_UPDATE_OPTIONS
577
   /variable/CTEST_LABELS_FOR_SUBPROJECTS
578 579
   /variable/CTEST_MEMORYCHECK_COMMAND
   /variable/CTEST_MEMORYCHECK_COMMAND_OPTIONS
580
   /variable/CTEST_MEMORYCHECK_SANITIZER_OPTIONS
581
   /variable/CTEST_MEMORYCHECK_SUPPRESSIONS_FILE
582
   /variable/CTEST_MEMORYCHECK_TYPE
583 584 585 586 587
   /variable/CTEST_NIGHTLY_START_TIME
   /variable/CTEST_P4_CLIENT
   /variable/CTEST_P4_COMMAND
   /variable/CTEST_P4_OPTIONS
   /variable/CTEST_P4_UPDATE_OPTIONS
588
   /variable/CTEST_RUN_CURRENT_SCRIPT
589 590
   /variable/CTEST_SCP_COMMAND
   /variable/CTEST_SITE
591
   /variable/CTEST_SUBMIT_URL
592 593 594 595
   /variable/CTEST_SOURCE_DIRECTORY
   /variable/CTEST_SVN_COMMAND
   /variable/CTEST_SVN_OPTIONS
   /variable/CTEST_SVN_UPDATE_OPTIONS
596
   /variable/CTEST_TEST_LOAD
597 598 599 600
   /variable/CTEST_TEST_TIMEOUT
   /variable/CTEST_TRIGGER_SITE
   /variable/CTEST_UPDATE_COMMAND
   /variable/CTEST_UPDATE_OPTIONS
601
   /variable/CTEST_UPDATE_VERSION_ONLY
602
   /variable/CTEST_UPDATE_VERSION_OVERRIDE
603 604
   /variable/CTEST_USE_LAUNCHERS

605 606 607 608
Variables for CPack
===================

.. toctree::
609 610
   :maxdepth: 1

611 612 613 614
   /variable/CPACK_ABSOLUTE_DESTINATION_FILES
   /variable/CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY
   /variable/CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION
   /variable/CPACK_INCLUDE_TOPLEVEL_DIRECTORY
615
   /variable/CPACK_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS
616 617 618
   /variable/CPACK_PACKAGING_INSTALL_PREFIX
   /variable/CPACK_SET_DESTDIR
   /variable/CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION
619 620 621 622 623 624 625 626 627

Variable Expansion Operators
============================

.. toctree::
   :maxdepth: 1

   /variable/CACHE
   /variable/ENV
628

629
Internal Variables
630 631
==================

632 633 634 635 636
CMake has many internal variables.  Most of them are undocumented.
Some of them, however, were at some point described as normal
variables, and therefore may be encountered in legacy code. They
are subject to change, and not recommended for use in project code.

637 638 639 640
.. toctree::
   :maxdepth: 1

   /variable/CMAKE_HOME_DIRECTORY
641 642 643 644 645 646 647
   /variable/CMAKE_INTERNAL_PLATFORM_ABI
   /variable/CMAKE_LANG_COMPILER_ABI
   /variable/CMAKE_LANG_COMPILER_ARCHITECTURE_ID
   /variable/CMAKE_LANG_COMPILER_VERSION_INTERNAL
   /variable/CMAKE_LANG_PLATFORM_ID
   /variable/CMAKE_NOT_USING_CONFIG_FLAGS
   /variable/CMAKE_VS_INTEL_Fortran_PROJECT_VERSION