Cmake知識整理

CMake官方文檔

CMake特色

CMake是支持跨平臺的構建系統。shell

CMake命令

cmake [{-D = }...] -P express

參數 做用
-D 用於傳入配置項option,更新或建立緩存入口
-E cmake -E [ ...] 命令行工具模式
-Wdev 禁止開發者告警,也會忽略過期信息告警
-P 執行cmake腳本

-E 支持不少內置命令,如make_directory, copy_directory, echo, env, md5sum, rename, touch等。編程

find_package

加載外部的項目。CMake尋找Find<package>.cmake,在目錄CMKAE_MODULE_PATH路徑中定義的。緩存

二進制目標

add_executable()
生成可執行文件。
add_library()
默認定義的是static庫,可使用BUILD_SHARED_LIBS變量來改變默認行爲。編程語言

target_link_libraries() 給二進制添加依賴工具

構建選項

target_include_directories()
生成INCLUDE_DIRECTORIES, INTERFACE_INCLUDE_DIRECTORIES兩個變量。若是隻是用於庫的實現,那應該用PRIVATE關鍵字;若是是庫的頭文件也使用了依賴,應該使用PUBLIC關鍵字;若是隻是頭文件使用了的話,那麼能夠用INTERFACE關鍵字。默認是什麼關鍵字的?
target_compile_definitions()
生成COMPILE_DEFINITIONS, INTERFACE_COMPILE_DEFINITIONS兩個變量。
target_compile_options()
生成COMPILE_OPTIONS, INTERFACE_COMPILE_OPTIONS兩個變量。ui

PRIVATE, PUBLIC, INTERFACE三種模式。命令行

CMake文本內置命令

這些命令是一直存在的。
break
退出循環
cmake_host_system_information
查詢系統信息
cmake_minimum_required
cmake版本要求
cmake_parse_arguments
解析傳入參數
cmake_policy
設置cmake策略
configure_file
設置配置文件
continue
繼續循環
elseif
else
endforeach
endfunction
endif
endmacro
endwhile
以上全是cmake的代碼邏輯。
execute_process
執行shell命令或其餘腳本命令,並得到結果。能夠用於跟外部構建程序交互。
file
文件操做,包括文件讀寫,移動,上傳等。
find_file
查找指定文件的路徑,並保存起來。
find_library
查找lib所在的路徑,並保存到指定的變量中。NAME字段能夠寫全稱。
find_package
使用第三方的庫。
find_path
查找到指定file文件的目錄。
find_program調試

foreach
function
get_cmake_property
get_directory_property
get_filename_component
get_filename_component( [CACHE])
COMP字段能夠是DIRECTORY(只保存路徑,不包含文件名字),NAME(文件名字不包含路徑),EXT(文件名字最長的後綴),PATH,ABSOLUTE(file的全路徑),REALPATH(file的真實路徑)。
若是CACHE是設置的,那麼變量結果會保存進CACHE中。
get_property
獲得一個屬性。
if
include
加載一個CMake文件,相似於c語言中的include。
include_guard
list
字符串列表處理操做,頗有用的工具。
macro
mark_as_advanced
GUI模式下有用,script模式必定用沒有。
math
math(EXPR ),數學運算,加減乘除都須要這種語法功能,不然處理不了。
message
打印日誌。能夠用於中止cmake運行,很方便調試。
option
return
separate_arguments
separate_arguments( ),全部的空格被替換成「;」字符,方便用於後續處理。
set_directory_properties
set_property
set
設置變量。
site_name
string
字符串處理功能,包含字符串的查找,替換,正則匹配,大小寫轉換,長度,比較等。
unset
取消掉環境中某個值的設置。
variable_watch

while

CMake工程內置命令

這些命令只在CMake工程中可使用。
add_compile_definitions
在當前和之後添加編譯選項。
add_compile_options
在當前和之後添加編譯值。
add_custom_command
功能有兩個:1.執行一條命令生成文件。2.給一個target對象添加一條命令,當target自己被建立時會執行該命令,可是,若是target已經建立了,那麼command就不會被執行了。
add_custom_target
添加一個構建目標。
add_definitions
添加宏定義。
add_dependencies
添加target的依賴。
add_executable
添加構建二進制執行。
add_library
添加構建lib庫。
add_subdirectory
添加構建的二級目錄,通常在top的CMakeLists.txt中使用,用於將其餘CMakeLists.txt包含進build工程,使用相對目錄。
add_test
aux_source_directory
將某個目錄下的全部源碼文件賦值給一個變量。避免每次增長一個c文件就須要修改CMakeLists.txt,減輕開發編寫構建腳本的難度。
build_command
create_test_sourcelist
define_property
enable_language
enable_testing
export
從構建樹中導出target,給外部的項目使用。
fltk_wrap_ui
get_source_file_property
get_target_property
get_test_property
include_directories
Add the given directories to those the compiler uses to search for include files. Relative paths are interpreted as relative to the current source directory.給構建樹加入用於搜索的頭文件目錄。
include_external_msproject
include_regular_expression
install
用於安裝操做的設置。
link_directories
添加lib庫的連接目錄。
link_libraries
給後面將要添加的target連接庫。
load_cache
加載CACHE緩存。
project
設置項目名稱,以及內部自動定義的變量。
qt_wrap_cpp
qt_wrap_ui
remove_definitions
移除宏定義。
set_source_files_properties
給源碼文件設置key-value屬性。
set_target_properties
設置target目標的屬性,很經常使用。
set_tests_properties
source_group
target_compile_definitions
給某個target添加編譯選項定義。
target_compile_features
target_compile_options
給某個target添加選項定義。
target_include_directories
給某個target添加include頭文件目錄。
target_link_libraries
給某個target增長連接庫。
target_sources
給target對象增長源碼,target必須時已經經過add_executable()和add_library()命令建立的。
try_compile
try_run

CMake toolchains

主要用於交叉編譯,Cross Compiling。
主要經過-DCMAKE_TOOLCHAIN_FILE=path/to/file來傳遞cmake文件,用於定義一系列交叉編譯器的參數。CMAKE_CROSSCOMPILING變量會變置爲true。一個典型的toolchain文件:

set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR arm)

set(CMAKE_SYSROOT /home/devel/rasp-pi-rootfs)
set(CMAKE_STAGING_PREFIX /home/devel/stage)

set(tools /home/devel/gcc-4.7-linaro-rpi-gnueabihf)
set(CMAKE_C_COMPILER ${tools}/bin/arm-linux-gnueabihf-gcc)
set(CMAKE_CXX_COMPILER ${tools}/bin/arm-linux-gnueabihf-g++)

set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)

CMake變量--信息描述部分

CMAKE_AR
CMAKE_ARGC
CMAKE_ARGV0
CMAKE_BINARY_DIR
CMAKE_BUILD_TOOL
CMAKE_CACHEFILE_DIR
CMAKE_CACHE_MAJOR_VERSION
CMAKE_CACHE_MINOR_VERSION
CMAKE_CACHE_PATCH_VERSION
CMAKE_CFG_INTDIR
CMAKE_COMMAND
CMAKE_CROSSCOMPILING
CMAKE_CROSSCOMPILING_EMULATOR
CMAKE_CTEST_COMMAND
CMAKE_CURRENT_BINARY_DIR
CMAKE_CURRENT_LIST_DIR
CMAKE_CURRENT_LIST_FILE
CMAKE_CURRENT_LIST_LINE
CMAKE_CURRENT_SOURCE_DIR
CMAKE_DIRECTORY_LABELS
CMAKE_DL_LIBS
CMAKE_DOTNET_TARGET_FRAMEWORK_VERSION
CMAKE_EDIT_COMMAND
CMAKE_EXECUTABLE_SUFFIX
CMAKE_EXTRA_GENERATOR
CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES
CMAKE_FIND_PACKAGE_NAME
CMAKE_FIND_PACKAGE_SORT_DIRECTION
CMAKE_FIND_PACKAGE_SORT_ORDER
CMAKE_GENERATOR
CMAKE_GENERATOR_INSTANCE
CMAKE_GENERATOR_PLATFORM
CMAKE_GENERATOR_TOOLSET
CMAKE_HOME_DIRECTORY
CMAKE_IMPORT_LIBRARY_PREFIX
CMAKE_IMPORT_LIBRARY_SUFFIX
CMAKE_JOB_POOL_COMPILE
CMAKE_JOB_POOL_LINK
CMAKE_JOB_POOLS
CMAKE_ COMPILER_AR
CMAKE
COMPILER_RANLIB
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

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_SCRIPT_MODE_FILE
CMAKE_SHARED_LIBRARY_PREFIX
CMAKE_SHARED_LIBRARY_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_TOOLCHAIN_FILE
CMAKE_TWEAK_VERSION
CMAKE_VERBOSE_MAKEFILE
CMAKE_VERSION
CMAKE_VS_DEVENV_COMMAND
CMAKE_VS_INTEL_Fortran_PROJECT_VERSION
CMAKE_VS_MSBUILD_COMMAND
CMAKE_VS_NsightTegra_VERSION
CMAKE_VS_PLATFORM_NAME
CMAKE_VS_PLATFORM_TOOLSET
CMAKE_VS_PLATFORM_TOOLSET_CUDA
CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE
CMAKE_VS_PLATFORM_TOOLSET_VERSION
CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION
CMAKE_XCODE_GENERATE_SCHEME
CMAKE_XCODE_PLATFORM_TOOLSET
_BINARY_DIR
_DESCRIPTION
_HOMEPAGE_URL
_SOURCE_DIR
_VERSION
_VERSION_MAJOR
_VERSION_MINOR
_VERSION_PATCH
_VERSION_TWEAK
PROJECT_BINARY_DIR
PROJECT_DESCRIPTION
PROJECT_HOMEPAGE_URL
PROJECT_NAME
PROJECT_SOURCE_DIR
PROJECT_VERSION
PROJECT_VERSION_MAJOR
PROJECT_VERSION_MINOR
PROJECT_VERSION_PATCH
PROJECT_VERSION_TWEAK

CMake變量--動做行爲部分

BUILD_SHARED_LIBS
CMAKE_ABSOLUTE_DESTINATION_FILES
CMAKE_APPBUNDLE_PATH
CMAKE_AUTOMOC_RELAXED_MODE
CMAKE_BACKWARDS_COMPATIBILITY
CMAKE_BUILD_TYPE
CMAKE_CODEBLOCKS_COMPILER_ID
CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES
CMAKE_CODELITE_USE_TARGETS
CMAKE_COLOR_MAKEFILE
CMAKE_CONFIGURATION_TYPES
CMAKE_DEBUG_TARGET_PROPERTIES
CMAKE_DEPENDS_IN_PROJECT_ONLY
CMAKE_DISABLE_FIND_PACKAGE_
CMAKE_ECLIPSE_GENERATE_LINKED_RESOURCES
CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT
CMAKE_ECLIPSE_MAKE_ARGUMENTS
CMAKE_ECLIPSE_VERSION
CMAKE_ERROR_DEPRECATED
CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION
CMAKE_EXPORT_COMPILE_COMMANDS
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_NO_PACKAGE_REGISTRY
CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY
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_FRAMEWORK_PATH
CMAKE_IGNORE_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_LIBRARY_PATH
CMAKE_MFC_FLAG
CMAKE_MODULE_PATH
CMAKE_NOT_USING_CONFIG_FLAGS
CMAKE_POLICY_DEFAULT_CMP
CMAKE_POLICY_WARNING_CMP
CMAKE_PREFIX_PATH
CMAKE_PROGRAM_PATH
CMAKE_PROJECT_ _INCLUDE
CMAKE_SKIP_INSTALL_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_INCLUDE_PATH
CMAKE_SYSTEM_LIBRARY_PATH
CMAKE_SYSTEM_PREFIX_PATH
CMAKE_SYSTEM_PROGRAM_PATH
CMAKE_USER_MAKE_RULES_OVERRIDE
CMAKE_WARN_DEPRECATED
CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION
CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY
_ROOT

CMake變量--系統描述部分

ANDROID
APPLE
BORLAND
CMAKE_CL_64
CMAKE_COMPILER_2005
CMAKE_HOST_APPLE
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
ENV
GHS-MULTI
MINGW
MSVC
MSVC10
MSVC11
MSVC12
MSVC14
MSVC60
MSVC70
MSVC71
MSVC80
MSVC90
MSVC_IDE
MSVC_TOOLSET_VERSION
MSVC_VERSION
UNIX
WIN32
WINCE
WINDOWS_PHONE
WINDOWS_STORE
XCODE
XCODE_VERSION

CMake變量--構建控制部分

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_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_SECURE_PROPS_PATH
CMAKE_ANDROID_SKIP_ANT_STEP
CMAKE_ANDROID_STANDALONE_TOOLCHAIN
CMAKE_ANDROID_STL_TYPE
CMAKE_ARCHIVE_OUTPUT_DIRECTORY
CMAKE_ARCHIVE_OUTPUT_DIRECTORY_
CMAKE_AUTOGEN_PARALLEL
CMAKE_AUTOMOC
CMAKE_AUTOMOC_COMPILER_PREDEFINES
CMAKE_AUTOMOC_DEPEND_FILTERS
CMAKE_AUTOMOC_MACRO_NAMES
CMAKE_AUTOMOC_MOC_OPTIONS
CMAKE_AUTORCC
CMAKE_AUTORCC_OPTIONS
CMAKE_AUTOUIC
CMAKE_AUTOUIC_OPTIONS
CMAKE_AUTOUIC_SEARCH_PATHS
CMAKE_BUILD_RPATH
CMAKE_BUILD_WITH_INSTALL_NAME_DIR
CMAKE_BUILD_WITH_INSTALL_RPATH
CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY
CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY_
CMAKE_ POSTFIX
CMAKE_CUDA_SEPARABLE_COMPILATION
CMAKE_DEBUG_POSTFIX
CMAKE_ENABLE_EXPORTS
CMAKE_EXE_LINKER_FLAGS
CMAKE_EXE_LINKER_FLAGS

CMAKE_EXE_LINKER_FLAGS_ INIT
CMAKE_EXE_LINKER_FLAGS_INIT
CMAKE_FOLDER
CMAKE_Fortran_FORMAT
CMAKE_Fortran_MODULE_DIRECTORY
CMAKE_GNUtoMS
CMAKE_INCLUDE_CURRENT_DIR
CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE
CMAKE_INSTALL_NAME_DIR
CMAKE_INSTALL_RPATH
CMAKE_INSTALL_RPATH_USE_LINK_PATH
CMAKE_INTERPROCEDURAL_OPTIMIZATION
CMAKE_INTERPROCEDURAL_OPTIMIZATION

CMAKE_IOS_INSTALL_COMBINED
CMAKE_ CLANG_TIDY
CMAKE
COMPILER_LAUNCHER
CMAKE
CPPCHECK
CMAKE
CPPLINT
CMAKE
INCLUDE_WHAT_YOU_USE
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_INTERFACE_LIBRARIES
CMAKE_LINK_LIBRARY_FILE_FLAG
CMAKE_LINK_LIBRARY_FLAG
CMAKE_LINK_WHAT_YOU_USE
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_MSVCIDE_RUN_PATH
CMAKE_NINJA_OUTPUT_PATH_PREFIX
CMAKE_NO_BUILTIN_CHRPATH
CMAKE_NO_SYSTEM_FROM_IMPORTED
CMAKE_OSX_ARCHITECTURES
CMAKE_OSX_DEPLOYMENT_TARGET
CMAKE_OSX_SYSROOT
CMAKE_PDB_OUTPUT_DIRECTORY
CMAKE_PDB_OUTPUT_DIRECTORY

CMAKE_POSITION_INDEPENDENT_CODE
CMAKE_RUNTIME_OUTPUT_DIRECTORY
CMAKE_RUNTIME_OUTPUT_DIRECTORY_
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_TRY_COMPILE_CONFIGURATION
CMAKE_TRY_COMPILE_PLATFORM_VARIABLES
CMAKE_TRY_COMPILE_TARGET_TYPE
CMAKE_USE_RELATIVE_PATHS
CMAKE_VISIBILITY_INLINES_HIDDEN
CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD
CMAKE_VS_INCLUDE_PACKAGE_TO_DEFAULT_BUILD
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_WIN32_EXECUTABLE
CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS
CMAKE_XCODE_ATTRIBUTE

EXECUTABLE_OUTPUT_PATH
LIBRARY_OUTPUT_PATH

CMake變量--編程語言部分

CMAKE_COMPILER_IS_GNUCC
CMAKE_COMPILER_IS_GNUCXX
CMAKE_COMPILER_IS_GNUG77
CMAKE_CUDA_HOST_COMPILER
CMAKE_CUDA_EXTENSIONS
CMAKE_CUDA_STANDARD
CMAKE_CUDA_STANDARD_REQUIRED
CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES
CMAKE_CXX_COMPILE_FEATURES
CMAKE_CXX_EXTENSIONS
CMAKE_CXX_STANDARD
CMAKE_CXX_STANDARD_REQUIRED
CMAKE_C_COMPILE_FEATURES
CMAKE_C_EXTENSIONS
CMAKE_C_STANDARD
CMAKE_C_STANDARD_REQUIRED
CMAKE_Fortran_MODDIR_DEFAULT
CMAKE_Fortran_MODDIR_FLAG
CMAKE_Fortran_MODOUT_FLAG
CMAKE_INTERNAL_PLATFORM_ABI
CMAKE_ ANDROID_TOOLCHAIN_MACHINE
CMAKE
ANDROID_TOOLCHAIN_PREFIX
CMAKE
ANDROID_TOOLCHAIN_SUFFIX
CMAKE
ARCHIVE_APPEND
CMAKE
ARCHIVE_CREATE
CMAKE
ARCHIVE_FINISH
CMAKE
COMPILER
CMAKE
COMPILER_ABI
CMAKE
COMPILER_ARCHITECTURE_ID
CMAKE
COMPILER_EXTERNAL_TOOLCHAIN
CMAKE
COMPILER_ID
CMAKE
COMPILER_LOADED
CMAKE
COMPILER_PREDEFINES_COMMAND
CMAKE
COMPILER_TARGET
CMAKE
COMPILER_VERSION
CMAKE
COMPILER_VERSION_INTERNAL
CMAKE
COMPILE_OBJECT
CMAKE
CREATE_SHARED_LIBRARY
CMAKE
CREATE_SHARED_MODULE
CMAKE
CREATE_STATIC_LIBRARY
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
GHS_KERNEL_FLAGS
CMAKE_ GHS_KERNEL_FLAGS_DEBUG
CMAKE
GHS_KERNEL_FLAGS_MINSIZEREL
CMAKE
GHS_KERNEL_FLAGS_RELEASE
CMAKE
GHS_KERNEL_FLAGS_RELWITHDEBINFO
CMAKE
IGNORE_EXTENSIONS
CMAKE
IMPLICIT_INCLUDE_DIRECTORIES
CMAKE
IMPLICIT_LINK_DIRECTORIES
CMAKE
IMPLICIT_LINK_FRAMEWORK_DIRECTORIES
CMAKE
IMPLICIT_LINK_LIBRARIES
CMAKE
LIBRARY_ARCHITECTURE
CMAKE
LINKER_PREFERENCE
CMAKE
LINKER_PREFERENCE_PROPAGATES
CMAKE
LINK_EXECUTABLE
CMAKE
OUTPUT_EXTENSION
CMAKE
PLATFORM_ID
CMAKE
SIMULATE_ID
CMAKE
SIMULATE_VERSION
CMAKE
SIZEOF_DATA_PTR
CMAKE
SOURCE_FILE_EXTENSIONS
CMAKE
STANDARD_INCLUDE_DIRECTORIES
CMAKE
STANDARD_LIBRARIES
CMAKE_Swift_LANGUAGE_VERSION
CMAKE_USER_MAKE_RULES_OVERRIDE

CMake變量--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_CURL_OPTIONS
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_IGNORE
CTEST_CUSTOM_WARNING_EXCEPTION
CTEST_CUSTOM_WARNING_MATCH
CTEST_CVS_CHECKOUT
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_RUN_CURRENT_SCRIPT
CTEST_SCP_COMMAND
CTEST_SITE
CTEST_SOURCE_DIRECTORY
CTEST_SVN_COMMAND
CTEST_SVN_OPTIONS
CTEST_SVN_UPDATE_OPTIONS
CTEST_TEST_LOAD
CTEST_TEST_TIMEOUT
CTEST_TRIGGER_SITE
CTEST_UPDATE_COMMAND
CTEST_UPDATE_OPTIONS
CTEST_UPDATE_VERSION_ONLY
CTEST_USE_LAUNCHERS

CMake變量--CPack部分

CPACK_ABSOLUTE_DESTINATION_FILES CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION CPACK_INCLUDE_TOPLEVEL_DIRECTORY CPACK_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS CPACK_INSTALL_SCRIPT CPACK_PACKAGING_INSTALL_PREFIX CPACK_SET_DESTDIR CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION

相關文章
相關標籤/搜索