cmake-variables(7)¶
此页面记录了由 CMake 提供或在项目代码中设置时对 CMake 有意义的变量。
有关变量的一般信息,请参阅 cmake-language 手册中 变量 部分。
提供信息的变量¶
- CMAKE_AR
- CMAKE_ARGC
- CMAKE_ARGV0
- CMAKE_BINARY_DIR
- CMAKE_BUILD_TOOL
- CMAKE_CACHE_MAJOR_VERSION
- CMAKE_CACHE_MINOR_VERSION
- CMAKE_CACHE_PATCH_VERSION
- CMAKE_CACHEFILE_DIR
- CMAKE_CFG_INTDIR
- CMAKE_COMMAND
- CMAKE_CPACK_COMMAND
- CMAKE_CROSSCOMPILING
- CMAKE_CROSSCOMPILING_EMULATOR
- CMAKE_CTEST_COMMAND
- CMAKE_CURRENT_BINARY_DIR
- CMAKE_CURRENT_FUNCTION
- CMAKE_CURRENT_FUNCTION_LIST_DIR
- CMAKE_CURRENT_FUNCTION_LIST_FILE
- CMAKE_CURRENT_FUNCTION_LIST_LINE
- CMAKE_CURRENT_LIST_DIR
- CMAKE_CURRENT_LIST_FILE
- CMAKE_CURRENT_LIST_LINE
- CMAKE_CURRENT_SOURCE_DIR
- CMAKE_DEBUG_TARGET_PROPERTIES
- CMAKE_DIRECTORY_LABELS
- CMAKE_DL_LIBS
- CMAKE_DOTNET_SDK
- CMAKE_DOTNET_TARGET_FRAMEWORK
- CMAKE_DOTNET_TARGET_FRAMEWORK_VERSION
- CMAKE_EDIT_COMMAND
- CMAKE_EXECUTABLE_SUFFIX
- CMAKE_EXECUTABLE_SUFFIX_<LANG>
- CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES
- CMAKE_FIND_DEBUG_MODE
- CMAKE_FIND_PACKAGE_NAME
- CMAKE_FIND_PACKAGE_REDIRECTS_DIR
- CMAKE_FIND_PACKAGE_SORT_DIRECTION
- CMAKE_FIND_PACKAGE_SORT_ORDER
- CMAKE_GENERATOR
- CMAKE_GENERATOR_INSTANCE
- CMAKE_GENERATOR_PLATFORM
- CMAKE_GENERATOR_TOOLSET
- CMAKE_IMPORT_LIBRARY_PREFIX
- CMAKE_IMPORT_LIBRARY_SUFFIX
- CMAKE_JOB_POOL_COMPILE
- CMAKE_JOB_POOL_LINK
- CMAKE_JOB_POOL_PRECOMPILE_HEADER
- CMAKE_JOB_POOLS
- CMAKE_<LANG>_COMPILER_AR
- CMAKE_<LANG>_COMPILER_FRONTEND_VARIANT
- CMAKE_<LANG>_COMPILER_LINKER
- CMAKE_<LANG>_COMPILER_LINKER_FRONTEND_VARIANT
- CMAKE_<LANG>_COMPILER_LINKER_ID
- CMAKE_<LANG>_COMPILER_LINKER_VERSION
- CMAKE_<LANG>_COMPILER_RANLIB
- CMAKE_<LANG>_LINK_LIBRARY_SUFFIX
- CMAKE_LINK_LIBRARY_SUFFIX
- CMAKE_LINK_SEARCH_END_STATIC
- CMAKE_LINK_SEARCH_START_STATIC
- CMAKE_MAJOR_VERSION
- CMAKE_MAKE_PROGRAM
- CMAKE_MATCH_COUNT
- CMAKE_MATCH_<n>
- CMAKE_MINIMUM_REQUIRED_VERSION
- CMAKE_MINOR_VERSION
- CMAKE_NETRC
- CMAKE_NETRC_FILE
- CMAKE_PARENT_LIST_FILE
- CMAKE_PATCH_VERSION
- CMAKE_PROJECT_DESCRIPTION
- CMAKE_PROJECT_HOMEPAGE_URL
- CMAKE_PROJECT_NAME
- CMAKE_PROJECT_VERSION
- CMAKE_PROJECT_VERSION_MAJOR
- CMAKE_PROJECT_VERSION_MINOR
- CMAKE_PROJECT_VERSION_PATCH
- CMAKE_PROJECT_VERSION_TWEAK
- CMAKE_RANLIB
- CMAKE_ROOT
- CMAKE_RULE_MESSAGES
- CMAKE_SCRIPT_MODE_FILE
- CMAKE_SHARED_LIBRARY_PREFIX
- CMAKE_SHARED_LIBRARY_SUFFIX
- CMAKE_SHARED_LIBRARY_ARCHIVE_SUFFIX
- CMAKE_SHARED_MODULE_PREFIX
- CMAKE_SHARED_MODULE_SUFFIX
- CMAKE_SIZEOF_VOID_P
- CMAKE_SKIP_INSTALL_RULES
- CMAKE_SKIP_RPATH
- CMAKE_SOURCE_DIR
- CMAKE_STATIC_LIBRARY_PREFIX
- CMAKE_STATIC_LIBRARY_SUFFIX
- CMAKE_Swift_COMPILATION_MODE
- CMAKE_Swift_MODULE_DIRECTORY
- CMAKE_Swift_NUM_THREADS
- CMAKE_TEST_LAUNCHER
- CMAKE_TOOLCHAIN_FILE
- CMAKE_TWEAK_VERSION
- CMAKE_VERBOSE_MAKEFILE
- CMAKE_VERSION
- CMAKE_VS_DEVENV_COMMAND
- CMAKE_VS_MSBUILD_COMMAND
- CMAKE_VS_NsightTegra_VERSION
- CMAKE_VS_NUGET_PACKAGE_RESTORE
- CMAKE_VS_PLATFORM_NAME
- CMAKE_VS_PLATFORM_NAME_DEFAULT
- CMAKE_VS_PLATFORM_TOOLSET
- CMAKE_VS_PLATFORM_TOOLSET_CUDA
- CMAKE_VS_PLATFORM_TOOLSET_CUDA_CUSTOM_DIR
- CMAKE_VS_PLATFORM_TOOLSET_FORTRAN
- CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE
- CMAKE_VS_PLATFORM_TOOLSET_VERSION
- CMAKE_VS_TARGET_FRAMEWORK_IDENTIFIER
- CMAKE_VS_TARGET_FRAMEWORK_TARGETS_VERSION
- CMAKE_VS_TARGET_FRAMEWORK_VERSION
- CMAKE_VS_USE_DEBUG_LIBRARIES
- CMAKE_VS_VERSION_BUILD_NUMBER
- CMAKE_VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION
- CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION
- CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION_MAXIMUM
- CMAKE_WINDOWS_KMDF_VERSION
- CMAKE_XCODE_BUILD_SYSTEM
- CMAKE_XCODE_PLATFORM_TOOLSET
- <PROJECT-NAME>_BINARY_DIR
- <PROJECT-NAME>_DESCRIPTION
- <PROJECT-NAME>_HOMEPAGE_URL
- <PROJECT-NAME>_IS_TOP_LEVEL
- <PROJECT-NAME>_SOURCE_DIR
- <PROJECT-NAME>_VERSION
- <PROJECT-NAME>_VERSION_MAJOR
- <PROJECT-NAME>_VERSION_MINOR
- <PROJECT-NAME>_VERSION_PATCH
- <PROJECT-NAME>_VERSION_TWEAK
- PROJECT_BINARY_DIR
- PROJECT_DESCRIPTION
- PROJECT_HOMEPAGE_URL
- PROJECT_IS_TOP_LEVEL
- PROJECT_NAME
- PROJECT_SOURCE_DIR
- PROJECT_VERSION
- PROJECT_VERSION_MAJOR
- PROJECT_VERSION_MINOR
- PROJECT_VERSION_PATCH
- PROJECT_VERSION_TWEAK
改变行为的变量¶
- BUILD_SHARED_LIBS
- CMAKE_ABSOLUTE_DESTINATION_FILES
- CMAKE_ADD_CUSTOM_COMMAND_DEPENDS_EXPLICIT_ONLY
- CMAKE_APPBUNDLE_PATH
- CMAKE_BUILD_TYPE
- CMAKE_CLANG_VFS_OVERLAY
- CMAKE_CODEBLOCKS_COMPILER_ID
- CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES
- CMAKE_CODELITE_USE_TARGETS
- CMAKE_COLOR_DIAGNOSTICS
- CMAKE_COLOR_MAKEFILE
- CMAKE_CONFIGURATION_TYPES
- CMAKE_DEPENDS_IN_PROJECT_ONLY
- CMAKE_DISABLE_FIND_PACKAGE_<PackageName>
- CMAKE_ECLIPSE_GENERATE_LINKED_RESOURCES
- CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT
- CMAKE_ECLIPSE_MAKE_ARGUMENTS
- CMAKE_ECLIPSE_RESOURCE_ENCODING
- CMAKE_ECLIPSE_VERSION
- CMAKE_ERROR_DEPRECATED
- CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION
- CMAKE_EXECUTE_PROCESS_COMMAND_ECHO
- CMAKE_EXPORT_BUILD_DATABASE
- CMAKE_EXPORT_COMPILE_COMMANDS
- CMAKE_EXPORT_PACKAGE_REGISTRY
- CMAKE_EXPORT_NO_PACKAGE_REGISTRY
- CMAKE_FIND_APPBUNDLE
- CMAKE_FIND_FRAMEWORK
- CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX
- CMAKE_FIND_LIBRARY_PREFIXES
- CMAKE_FIND_LIBRARY_SUFFIXES
- CMAKE_FIND_NO_INSTALL_PREFIX
- CMAKE_FIND_PACKAGE_PREFER_CONFIG
- CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS
- CMAKE_FIND_PACKAGE_TARGETS_GLOBAL
- CMAKE_FIND_PACKAGE_WARN_NO_MODULE
- CMAKE_FIND_ROOT_PATH
- CMAKE_FIND_ROOT_PATH_MODE_INCLUDE
- CMAKE_FIND_ROOT_PATH_MODE_LIBRARY
- CMAKE_FIND_ROOT_PATH_MODE_PACKAGE
- CMAKE_FIND_ROOT_PATH_MODE_PROGRAM
- CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH
- CMAKE_FIND_USE_CMAKE_PATH
- CMAKE_FIND_USE_CMAKE_SYSTEM_PATH
- CMAKE_FIND_USE_INSTALL_PREFIX
- CMAKE_FIND_USE_PACKAGE_REGISTRY
- CMAKE_FIND_USE_PACKAGE_ROOT_PATH
- CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH
- CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY
- CMAKE_FRAMEWORK_PATH
- CMAKE_IGNORE_PATH
- CMAKE_IGNORE_PREFIX_PATH
- CMAKE_INCLUDE_DIRECTORIES_BEFORE
- CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE
- CMAKE_INCLUDE_PATH
- CMAKE_INSTALL_DEFAULT_COMPONENT_NAME
- CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS
- CMAKE_INSTALL_MESSAGE
- CMAKE_INSTALL_PREFIX
- CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT
- CMAKE_KATE_FILES_MODE
- CMAKE_KATE_MAKE_ARGUMENTS
- CMAKE_LIBRARY_PATH
- CMAKE_LINK_DIRECTORIES_BEFORE
- CMAKE_LINK_LIBRARIES_ONLY_TARGETS
- CMAKE_MAXIMUM_RECURSION_DEPTH
- CMAKE_MESSAGE_CONTEXT
- CMAKE_MESSAGE_CONTEXT_SHOW
- CMAKE_MESSAGE_INDENT
- CMAKE_MESSAGE_LOG_LEVEL
- CMAKE_MFC_FLAG
- CMAKE_MODULE_PATH
- CMAKE_POLICY_DEFAULT_CMP<NNNN>
- CMAKE_POLICY_WARNING_CMP<NNNN>
- CMAKE_PREFIX_PATH
- CMAKE_PROGRAM_PATH
- CMAKE_PROJECT_INCLUDE
- CMAKE_PROJECT_INCLUDE_BEFORE
- CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE
- CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE_BEFORE
- CMAKE_PROJECT_TOP_LEVEL_INCLUDES
- CMAKE_REQUIRE_FIND_PACKAGE_<PackageName>
- CMAKE_SKIP_INSTALL_ALL_DEPENDENCY
- CMAKE_SKIP_TEST_ALL_DEPENDENCY
- CMAKE_STAGING_PREFIX
- CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS
- CMAKE_SUBLIME_TEXT_2_EXCLUDE_BUILD_TREE
- CMAKE_SUPPRESS_REGENERATION
- CMAKE_SYSROOT
- CMAKE_SYSROOT_COMPILE
- CMAKE_SYSROOT_LINK
- CMAKE_SYSTEM_APPBUNDLE_PATH
- CMAKE_SYSTEM_FRAMEWORK_PATH
- CMAKE_SYSTEM_IGNORE_PATH
- CMAKE_SYSTEM_IGNORE_PREFIX_PATH
- CMAKE_SYSTEM_INCLUDE_PATH
- CMAKE_SYSTEM_LIBRARY_PATH
- CMAKE_SYSTEM_PREFIX_PATH
- CMAKE_SYSTEM_PROGRAM_PATH
- CMAKE_TLS_CAINFO
- CMAKE_TLS_VERIFY
- CMAKE_TLS_VERSION
- CMAKE_USER_MAKE_RULES_OVERRIDE
- CMAKE_WARN_DEPRECATED
- CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION
- CMAKE_XCODE_GENERATE_SCHEME
- CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY
- CMAKE_XCODE_LINK_BUILD_PHASE_MODE
- CMAKE_XCODE_SCHEME_ADDRESS_SANITIZER
- CMAKE_XCODE_SCHEME_ADDRESS_SANITIZER_USE_AFTER_RETURN
- CMAKE_XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING
- CMAKE_XCODE_SCHEME_DISABLE_MAIN_THREAD_CHECKER
- CMAKE_XCODE_SCHEME_DYNAMIC_LIBRARY_LOADS
- CMAKE_XCODE_SCHEME_DYNAMIC_LINKER_API_USAGE
- CMAKE_XCODE_SCHEME_ENABLE_GPU_API_VALIDATION
- CMAKE_XCODE_SCHEME_ENABLE_GPU_FRAME_CAPTURE_MODE
- CMAKE_XCODE_SCHEME_ENABLE_GPU_SHADER_VALIDATION
- CMAKE_XCODE_SCHEME_ENVIRONMENT
- CMAKE_XCODE_SCHEME_GUARD_MALLOC
- CMAKE_XCODE_SCHEME_LAUNCH_CONFIGURATION
- CMAKE_XCODE_SCHEME_LAUNCH_MODE
- CMAKE_XCODE_SCHEME_MAIN_THREAD_CHECKER_STOP
- CMAKE_XCODE_SCHEME_MALLOC_GUARD_EDGES
- CMAKE_XCODE_SCHEME_MALLOC_SCRIBBLE
- CMAKE_XCODE_SCHEME_MALLOC_STACK
- CMAKE_XCODE_SCHEME_THREAD_SANITIZER
- CMAKE_XCODE_SCHEME_THREAD_SANITIZER_STOP
- CMAKE_XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER
- CMAKE_XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER_STOP
- CMAKE_XCODE_SCHEME_WORKING_DIRECTORY
- CMAKE_XCODE_SCHEME_ZOMBIE_OBJECTS
- CMAKE_XCODE_XCCONFIG
- <PackageName>_ROOT
描述系统的变量¶
- ANDROID
- APPLE
- BORLAND
- BSD
- CMAKE_ANDROID_NDK_VERSION
- CMAKE_CL_64
- CMAKE_COMPILER_2005
- CMAKE_HOST_APPLE
- CMAKE_HOST_BSD
- CMAKE_HOST_EXECUTABLE_SUFFIX
- CMAKE_HOST_LINUX
- CMAKE_HOST_SOLARIS
- CMAKE_HOST_SYSTEM
- CMAKE_HOST_SYSTEM_NAME
- CMAKE_HOST_SYSTEM_PROCESSOR
- CMAKE_HOST_SYSTEM_VERSION
- CMAKE_HOST_UNIX
- CMAKE_HOST_WIN32
- CMAKE_LIBRARY_ARCHITECTURE
- CMAKE_LIBRARY_ARCHITECTURE_REGEX
- CMAKE_OBJECT_PATH_MAX
- CMAKE_SYSTEM
- CMAKE_SYSTEM_NAME
- CMAKE_SYSTEM_PROCESSOR
- CMAKE_SYSTEM_VERSION
- CYGWIN
- GHSMULTI
- IOS
- LINUX
- MINGW
- MSVC
- MSVC_IDE
- MSVC_TOOLSET_VERSION
- MSVC_VERSION
- MSYS
- UNIX
- WASI
- WIN32
- WINCE
- WINDOWS_PHONE
- WINDOWS_STORE
- XCODE
- XCODE_VERSION
控制构建的变量¶
- CMAKE_ADSP_ROOT
- CMAKE_AIX_SHARED_LIBRARY_ARCHIVE
- CMAKE_AIX_EXPORT_ALL_SYMBOLS
- CMAKE_ANDROID_ANT_ADDITIONAL_OPTIONS
- CMAKE_ANDROID_API
- CMAKE_ANDROID_API_MIN
- CMAKE_ANDROID_ARCH
- CMAKE_ANDROID_ARCH_ABI
- CMAKE_ANDROID_ARM_MODE
- CMAKE_ANDROID_ARM_NEON
- CMAKE_ANDROID_ASSETS_DIRECTORIES
- CMAKE_ANDROID_EXCEPTIONS
- CMAKE_ANDROID_GUI
- CMAKE_ANDROID_JAR_DEPENDENCIES
- CMAKE_ANDROID_JAR_DIRECTORIES
- CMAKE_ANDROID_JAVA_SOURCE_DIR
- CMAKE_ANDROID_NATIVE_LIB_DEPENDENCIES
- CMAKE_ANDROID_NATIVE_LIB_DIRECTORIES
- CMAKE_ANDROID_NDK
- CMAKE_ANDROID_NDK_DEPRECATED_HEADERS
- CMAKE_ANDROID_NDK_TOOLCHAIN_HOST_TAG
- CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION
- CMAKE_ANDROID_PROCESS_MAX
- CMAKE_ANDROID_PROGUARD
- CMAKE_ANDROID_PROGUARD_CONFIG_PATH
- CMAKE_ANDROID_RTTI
- CMAKE_ANDROID_SECURE_PROPS_PATH
- CMAKE_ANDROID_SKIP_ANT_STEP
- CMAKE_ANDROID_STANDALONE_TOOLCHAIN
- CMAKE_ANDROID_STL_TYPE
- CMAKE_APPLE_SILICON_PROCESSOR
- CMAKE_ARCHIVE_OUTPUT_DIRECTORY
- CMAKE_ARCHIVE_OUTPUT_DIRECTORY_
- CMAKE_AUTOGEN_BETTER_GRAPH_MULTI_CONFIG
- CMAKE_AUTOGEN_COMMAND_LINE_LENGTH_MAX
- CMAKE_AUTOGEN_ORIGIN_DEPENDS
- CMAKE_AUTOGEN_PARALLEL
- CMAKE_AUTOGEN_USE_SYSTEM_INCLUDE
- CMAKE_AUTOGEN_VERBOSE
- CMAKE_AUTOMOC
- CMAKE_AUTOMOC_COMPILER_PREDEFINES
- CMAKE_AUTOMOC_DEPEND_FILTERS
- CMAKE_AUTOMOC_MACRO_NAMES
- CMAKE_AUTOMOC_MOC_OPTIONS
- CMAKE_AUTOMOC_PATH_PREFIX
- CMAKE_AUTOMOC_EXECUTABLE
- CMAKE_AUTORCC
- CMAKE_AUTORCC_OPTIONS
- CMAKE_AUTORCC_EXECUTABLE
- CMAKE_AUTOUIC
- CMAKE_AUTOUIC_OPTIONS
- CMAKE_AUTOUIC_SEARCH_PATHS
- CMAKE_AUTOUIC_EXECUTABLE
- CMAKE_BUILD_RPATH
- CMAKE_BUILD_RPATH_USE_ORIGIN
- CMAKE_BUILD_WITH_INSTALL_NAME_DIR
- CMAKE_BUILD_WITH_INSTALL_RPATH
- CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY
- CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY_
- CMAKE_COMPILE_WARNING_AS_ERROR
- CMAKE_
_POSTFIX - CMAKE_CROSS_CONFIGS
- CMAKE_CTEST_ARGUMENTS
- CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS
- CMAKE_CUDA_RUNTIME_LIBRARY
- CMAKE_CUDA_SEPARABLE_COMPILATION
- CMAKE_CXX_MODULE_STD
- CMAKE_CXX_SCAN_FOR_MODULES
- CMAKE_DEBUG_POSTFIX
- CMAKE_DEFAULT_BUILD_TYPE
- CMAKE_DEFAULT_CONFIGS
- CMAKE_DEPENDS_USE_COMPILER
- CMAKE_DISABLE_PRECOMPILE_HEADERS
- CMAKE_DLL_NAME_WITH_SOVERSION
- CMAKE_ENABLE_EXPORTS
- CMAKE_EXECUTABLE_ENABLE_EXPORTS
- CMAKE_EXE_LINKER_FLAGS
- CMAKE_EXE_LINKER_FLAGS_
- CMAKE_EXE_LINKER_FLAGS_
_INIT - CMAKE_EXE_LINKER_FLAGS_INIT
- CMAKE_EXPORT_FIND_PACKAGE_NAME
- CMAKE_FOLDER
- CMAKE_Fortran_FORMAT
- CMAKE_Fortran_MODULE_DIRECTORY
- CMAKE_Fortran_PREPROCESS
- CMAKE_FRAMEWORK
- CMAKE_FRAMEWORK_MULTI_CONFIG_POSTFIX_
- CMAKE_GHS_NO_SOURCE_GROUP_FILE
- CMAKE_GLOBAL_AUTOGEN_TARGET
- CMAKE_GLOBAL_AUTOGEN_TARGET_NAME
- CMAKE_GLOBAL_AUTORCC_TARGET
- CMAKE_GLOBAL_AUTORCC_TARGET_NAME
- CMAKE_GNUtoMS
- CMAKE_INCLUDE_CURRENT_DIR
- CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE
- CMAKE_INSTALL_NAME_DIR
- CMAKE_INSTALL_REMOVE_ENVIRONMENT_RPATH
- CMAKE_INSTALL_RPATH
- CMAKE_INSTALL_RPATH_USE_LINK_PATH
- CMAKE_INTERPROCEDURAL_OPTIMIZATION
- CMAKE_INTERPROCEDURAL_OPTIMIZATION_
- CMAKE_
_CLANG_TIDY - CMAKE_
_CLANG_TIDY_EXPORT_FIXES_DIR - CMAKE_
_COMPILER_LAUNCHER - CMAKE_
_CPPCHECK - CMAKE_
_CPPLINT - CMAKE_
_INCLUDE_WHAT_YOU_USE - CMAKE_
_LINK_GROUP_USING_ - CMAKE_
_LINK_GROUP_USING_ _SUPPORTED - CMAKE_
_LINK_LIBRARY_ _ATTRIBUTES - CMAKE_
_LINK_LIBRARY_FILE_FLAG - CMAKE_
_LINK_LIBRARY_FLAG - CMAKE_
_LINK_LIBRARY_USING_ - CMAKE_
_LINK_LIBRARY_USING_ _SUPPORTED - CMAKE_
_LINK_WHAT_YOU_USE_FLAG - CMAKE_
_LINKER_LAUNCHER - CMAKE_
_USING_LINKER_MODE - CMAKE_
_USING_LINKER_ - CMAKE_
_VISIBILITY_PRESET - CMAKE_LIBRARY_OUTPUT_DIRECTORY
- CMAKE_LIBRARY_OUTPUT_DIRECTORY_
- CMAKE_LIBRARY_PATH_FLAG
- CMAKE_LINK_DEF_FILE_FLAG
- CMAKE_LINK_DEPENDS_NO_SHARED
- CMAKE_LINK_DEPENDS_USE_LINKER
- CMAKE_LINK_GROUP_USING_
- CMAKE_LINK_GROUP_USING_
_SUPPORTED - CMAKE_LINK_INTERFACE_LIBRARIES
- CMAKE_LINK_LIBRARIES_STRATEGY
- CMAKE_LINK_LIBRARY_
_ATTRIBUTES - CMAKE_LINK_LIBRARY_FILE_FLAG
- CMAKE_LINK_LIBRARY_FLAG
- CMAKE_LINK_LIBRARY_USING_
- CMAKE_LINK_LIBRARY_USING_
_SUPPORTED - CMAKE_LINK_WHAT_YOU_USE
- CMAKE_LINK_WHAT_YOU_USE_CHECK
- CMAKE_LINKER_TYPE
- CMAKE_MACOSX_BUNDLE
- CMAKE_MACOSX_RPATH
- CMAKE_MAP_IMPORTED_CONFIG_
- CMAKE_MODULE_LINKER_FLAGS
- CMAKE_MODULE_LINKER_FLAGS_
- CMAKE_MODULE_LINKER_FLAGS_
_INIT - CMAKE_MODULE_LINKER_FLAGS_INIT
- CMAKE_MSVC_DEBUG_INFORMATION_FORMAT
- CMAKE_MSVC_RUNTIME_LIBRARY
- CMAKE_MSVCIDE_RUN_PATH
- CMAKE_NINJA_OUTPUT_PATH_PREFIX
- CMAKE_NO_BUILTIN_CHRPATH
- CMAKE_NO_SYSTEM_FROM_IMPORTED
- CMAKE_OPTIMIZE_DEPENDENCIES
- CMAKE_OSX_ARCHITECTURES
- CMAKE_OSX_DEPLOYMENT_TARGET
- CMAKE_OSX_SYSROOT
- CMAKE_PCH_INSTANTIATE_TEMPLATES
- CMAKE_PCH_WARN_INVALID
- CMAKE_PDB_OUTPUT_DIRECTORY
- CMAKE_PDB_OUTPUT_DIRECTORY_
- CMAKE_PLATFORM_NO_VERSIONED_SONAME
- CMAKE_POSITION_INDEPENDENT_CODE
- CMAKE_RUNTIME_OUTPUT_DIRECTORY
- CMAKE_RUNTIME_OUTPUT_DIRECTORY_
- CMAKE_SHARED_LIBRARY_ENABLE_EXPORTS
- CMAKE_SHARED_LINKER_FLAGS
- CMAKE_SHARED_LINKER_FLAGS_
- CMAKE_SHARED_LINKER_FLAGS_
_INIT - CMAKE_SHARED_LINKER_FLAGS_INIT
- CMAKE_SKIP_BUILD_RPATH
- CMAKE_SKIP_INSTALL_RPATH
- CMAKE_STATIC_LINKER_FLAGS
- CMAKE_STATIC_LINKER_FLAGS_
- CMAKE_STATIC_LINKER_FLAGS_
_INIT - CMAKE_STATIC_LINKER_FLAGS_INIT
- CMAKE_TASKING_TOOLSET
- CMAKE_TRY_COMPILE_CONFIGURATION
- CMAKE_TRY_COMPILE_NO_PLATFORM_VARIABLES
- CMAKE_TRY_COMPILE_PLATFORM_VARIABLES
- CMAKE_TRY_COMPILE_TARGET_TYPE
- CMAKE_UNITY_BUILD
- CMAKE_UNITY_BUILD_BATCH_SIZE
- CMAKE_UNITY_BUILD_UNIQUE_ID
- CMAKE_VERIFY_INTERFACE_HEADER_SETS
- CMAKE_VISIBILITY_INLINES_HIDDEN
- CMAKE_VS_DEBUGGER_COMMAND
- CMAKE_VS_DEBUGGER_COMMAND_ARGUMENTS
- CMAKE_VS_DEBUGGER_ENVIRONMENT
- CMAKE_VS_DEBUGGER_WORKING_DIRECTORY
- CMAKE_VS_GLOBALS
- CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD
- CMAKE_VS_INCLUDE_PACKAGE_TO_DEFAULT_BUILD
- CMAKE_VS_JUST_MY_CODE_DEBUGGING
- CMAKE_VS_NO_COMPILE_BATCHING
- CMAKE_VS_SDK_EXCLUDE_DIRECTORIES
- CMAKE_VS_SDK_EXECUTABLE_DIRECTORIES
- CMAKE_VS_SDK_INCLUDE_DIRECTORIES
- CMAKE_VS_SDK_LIBRARY_DIRECTORIES
- CMAKE_VS_SDK_LIBRARY_WINRT_DIRECTORIES
- CMAKE_VS_SDK_REFERENCE_DIRECTORIES
- CMAKE_VS_SDK_SOURCE_DIRECTORIES
- CMAKE_VS_WINRT_BY_DEFAULT
- CMAKE_WATCOM_RUNTIME_LIBRARY
- CMAKE_WIN32_EXECUTABLE
- CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS
- CMAKE_XCODE_ATTRIBUTE_
- EXECUTABLE_OUTPUT_PATH
- LIBRARY_OUTPUT_PATH
语言变量¶
- CMAKE_C_COMPILE_FEATURES
- CMAKE_C_EXTENSIONS
- CMAKE_C_STANDARD
- CMAKE_C_STANDARD_REQUIRED
- CMAKE_CUDA_ARCHITECTURES
- CMAKE_CUDA_COMPILE_FEATURES
- CMAKE_CUDA_EXTENSIONS
- CMAKE_CUDA_HOST_COMPILER
- CMAKE_CUDA_STANDARD
- CMAKE_CUDA_STANDARD_REQUIRED
- CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES
- CMAKE_CXX_COMPILE_FEATURES
- CMAKE_CXX_COMPILER_IMPORT_STD
- CMAKE_CXX_EXTENSIONS
- CMAKE_CXX_STANDARD
- CMAKE_CXX_STANDARD_REQUIRED
- CMAKE_Fortran_MODDIR_DEFAULT
- CMAKE_Fortran_MODDIR_FLAG
- CMAKE_Fortran_MODOUT_FLAG
- CMAKE_HIP_ARCHITECTURES
- CMAKE_HIP_COMPILE_FEATURES
- CMAKE_HIP_EXTENSIONS
- CMAKE_HIP_PLATFORM
- CMAKE_HIP_STANDARD
- CMAKE_HIP_STANDARD_REQUIRED
- CMAKE_ISPC_HEADER_DIRECTORY
- CMAKE_ISPC_HEADER_SUFFIX
- CMAKE_ISPC_INSTRUCTION_SETS
- CMAKE_
_ANDROID_TOOLCHAIN_MACHINE - CMAKE_
_ANDROID_TOOLCHAIN_PREFIX - CMAKE_
_ANDROID_TOOLCHAIN_SUFFIX - CMAKE_
_ARCHIVE_APPEND - CMAKE_
_ARCHIVE_CREATE - CMAKE_
_ARCHIVE_FINISH - CMAKE_
_BYTE_ORDER - CMAKE_
_COMPILE_OBJECT - CMAKE_
_COMPILER - CMAKE_
_COMPILER_EXTERNAL_TOOLCHAIN - CMAKE_
_COMPILER_ID - CMAKE_
_COMPILER_LOADED - CMAKE_
_COMPILER_PREDEFINES_COMMAND - CMAKE_
_COMPILER_TARGET - CMAKE_
_COMPILER_VERSION - CMAKE_
_CREATE_SHARED_LIBRARY - CMAKE_
_CREATE_SHARED_LIBRARY_ARCHIVE - CMAKE_
_CREATE_SHARED_MODULE - CMAKE_
_CREATE_STATIC_LIBRARY - CMAKE_
_EXTENSIONS - CMAKE_
_EXTENSIONS_DEFAULT - CMAKE_
_FLAGS - CMAKE_
_FLAGS_ - CMAKE_
_FLAGS_ _INIT - CMAKE_
_FLAGS_DEBUG - CMAKE_
_FLAGS_DEBUG_INIT - CMAKE_
_FLAGS_INIT - CMAKE_
_FLAGS_MINSIZEREL - CMAKE_
_FLAGS_MINSIZEREL_INIT - CMAKE_
_FLAGS_RELEASE - CMAKE_
_FLAGS_RELEASE_INIT - CMAKE_
_FLAGS_RELWITHDEBINFO - CMAKE_
_FLAGS_RELWITHDEBINFO_INIT - CMAKE_
_HOST_COMPILER - CMAKE_
_HOST_COMPILER_ID - CMAKE_
_HOST_COMPILER_VERSION - CMAKE_
_IGNORE_EXTENSIONS - CMAKE_
_IMPLICIT_INCLUDE_DIRECTORIES - CMAKE_
_IMPLICIT_LINK_DIRECTORIES - CMAKE_
_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES - CMAKE_
_IMPLICIT_LINK_LIBRARIES - CMAKE_
_LIBRARY_ARCHITECTURE - CMAKE_
_LINK_EXECUTABLE - CMAKE_
_LINKER_WRAPPER_FLAG - CMAKE_
_LINKER_WRAPPER_FLAG_SEP - CMAKE_
_OUTPUT_EXTENSION - CMAKE_
_SIMULATE_ID - CMAKE_
_SIMULATE_VERSION - CMAKE_
_SIZEOF_DATA_PTR - CMAKE_
_SOURCE_FILE_EXTENSIONS - CMAKE_
_STANDARD - CMAKE_
_STANDARD_DEFAULT - CMAKE_
_STANDARD_INCLUDE_DIRECTORIES - CMAKE_
_STANDARD_LATEST - CMAKE_
_STANDARD_LIBRARIES - CMAKE_
_STANDARD_LINK_DIRECTORIES - CMAKE_
_STANDARD_REQUIRED - CMAKE_OBJC_EXTENSIONS
- CMAKE_OBJC_STANDARD
- CMAKE_OBJC_STANDARD_REQUIRED
- CMAKE_OBJCXX_EXTENSIONS
- CMAKE_OBJCXX_STANDARD
- CMAKE_OBJCXX_STANDARD_REQUIRED
- CMAKE_Swift_LANGUAGE_VERSION
- CMAKE_USER_MAKE_RULES_OVERRIDE_
CTest 变量¶
- CTEST_BINARY_DIRECTORY
- CTEST_BUILD_COMMAND
- CTEST_BUILD_NAME
- CTEST_BZR_COMMAND
- CTEST_BZR_UPDATE_OPTIONS
- CTEST_CHANGE_ID
- CTEST_CHECKOUT_COMMAND
- CTEST_CONFIGURATION_TYPE
- CTEST_CONFIGURE_COMMAND
- CTEST_COVERAGE_COMMAND
- CTEST_COVERAGE_EXTRA_FLAGS
- CTEST_CUSTOM_COVERAGE_EXCLUDE
- CTEST_CUSTOM_ERROR_EXCEPTION
- CTEST_CUSTOM_ERROR_MATCH
- CTEST_CUSTOM_ERROR_POST_CONTEXT
- CTEST_CUSTOM_ERROR_PRE_CONTEXT
- CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE
- CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS
- CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS
- CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE
- CTEST_CUSTOM_MEMCHECK_IGNORE
- CTEST_CUSTOM_POST_MEMCHECK
- CTEST_CUSTOM_POST_TEST
- CTEST_CUSTOM_PRE_MEMCHECK
- CTEST_CUSTOM_PRE_TEST
- CTEST_CUSTOM_TEST_OUTPUT_TRUNCATION
- CTEST_CUSTOM_TESTS_IGNORE
- CTEST_CUSTOM_WARNING_EXCEPTION
- CTEST_CUSTOM_WARNING_MATCH
- CTEST_CVS_COMMAND
- CTEST_CVS_UPDATE_OPTIONS
- CTEST_DROP_LOCATION
- CTEST_DROP_METHOD
- CTEST_DROP_SITE
- CTEST_DROP_SITE_CDASH
- CTEST_DROP_SITE_PASSWORD
- CTEST_DROP_SITE_USER
- CTEST_EXTRA_COVERAGE_GLOB
- CTEST_GIT_COMMAND
- CTEST_GIT_INIT_SUBMODULES
- CTEST_GIT_UPDATE_CUSTOM
- CTEST_GIT_UPDATE_OPTIONS
- CTEST_HG_COMMAND
- CTEST_HG_UPDATE_OPTIONS
- CTEST_LABELS_FOR_SUBPROJECTS
- CTEST_MEMORYCHECK_COMMAND
- CTEST_MEMORYCHECK_COMMAND_OPTIONS
- CTEST_MEMORYCHECK_SANITIZER_OPTIONS
- CTEST_MEMORYCHECK_SUPPRESSIONS_FILE
- CTEST_MEMORYCHECK_TYPE
- CTEST_NIGHTLY_START_TIME
- CTEST_P4_CLIENT
- CTEST_P4_COMMAND
- CTEST_P4_OPTIONS
- CTEST_P4_UPDATE_OPTIONS
- CTEST_RESOURCE_SPEC_FILE
- CTEST_RUN_CURRENT_SCRIPT
- CTEST_SCRIPT_DIRECTORY
- CTEST_SITE
- CTEST_SOURCE_DIRECTORY
- CTEST_SUBMIT_INACTIVITY_TIMEOUT
- CTEST_SUBMIT_URL
- CTEST_SVN_COMMAND
- CTEST_SVN_OPTIONS
- CTEST_SVN_UPDATE_OPTIONS
- CTEST_TEST_LOAD
- CTEST_TEST_TIMEOUT
- CTEST_TLS_VERIFY
- CTEST_TLS_VERSION
- CTEST_UPDATE_COMMAND
- CTEST_UPDATE_OPTIONS
- CTEST_UPDATE_VERSION_ONLY
- CTEST_UPDATE_VERSION_OVERRIDE
- CTEST_USE_LAUNCHERS
CPack 变量¶
- CPACK_ABSOLUTE_DESTINATION_FILES
- CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY
- CPACK_CUSTOM_INSTALL_VARIABLES
- CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION
- CPACK_INCLUDE_TOPLEVEL_DIRECTORY
- CPACK_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS
- CPACK_PACKAGING_INSTALL_PREFIX
- CPACK_SET_DESTDIR
- CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION
变量扩展操作符¶
内部变量¶
CMake 拥有许多内部变量。大多数变量都没有文档记录。然而,其中一些变量在某些时候被描述为普通变量,因此可能会在旧代码中遇到。它们可能会发生变化,并且不建议在项目代码中使用。
- CMAKE_HOME_DIRECTORY
- CMAKE_INTERNAL_PLATFORM_ABI
- CMAKE_<LANG>_COMPILER_ABI
- CMAKE_<LANG>_COMPILER_ARCHITECTURE_ID
- CMAKE_<LANG>_COMPILER_VERSION_INTERNAL
- CMAKE_<LANG>_LINKER_PREFERENCE
- CMAKE_<LANG>_LINKER_PREFERENCE_PROPAGATES
- CMAKE_<LANG>_PLATFORM_ID
- CMAKE_NOT_USING_CONFIG_FLAGS
- CMAKE_VS_INTEL_Fortran_PROJECT_VERSION