VSCode 和 CLion 探索_Liuqz2009的博客
Ubuntu学习心得——翻译篇——CMake教程(官方文档中文版)
Cmake官方教程解析
CMake Reference Documentation 参考手册
- CMake Tutorial 教程
- cmake-commands 命令
- cmake-generators 生成器,生成Makefile,VS工程等
- cmake-variables 变量
What is the difference between include_directories and target_include_directories in CMake?
CMake的几种Include
cmake 编译Release版本 - YZFHKMS-X
cmake重新编译_weixin_的博客
CMake语法—命令list | 程序员灯塔
cmake 多级目录编译_不是杠杠的博客
cmake(二十七)Cmake中target再理解_wzj_110的博客-CSDN博客_cmake target
cmake - 标签 - SirDigit
cmake:target_ 中的 PUBLIC,PRIVATE,INTERFACE - 知乎
cmake -G "Visual Studio 16 2019" -A x64 https://blog.51cto.com/ --fresh
cmake(1) — CMake 3.24.0-rc3 Documentation
参数:
常用命令示例:
参数:
定义可执行文件: add_executable()
定义可执行库: add_library()
定义二进制target的依赖关: target_link_libraries()
定义共享库类型: BUILD_SHARED_LIBS
CMAKE_CONFIGURATION_TYPES
cmake命令 分为:
脚本命令(Scripting Commands),
项目命令(Project Commands),
CTest 命令(CTest Commands),
不推荐使用的命令 (Deprecated Commands)
break
break — CMake 3.24.0-rc3 Documentation
cmake_host_system_information
cmake_host_system_information — CMake 3.24.0-rc3 Documentation
cmake_language
cmake_language — CMake 3.24.0-rc3 Documentation
cmake_minimum_required
cmake_minimum_required — CMake 3.24.0-rc3 Documentation
cmake_parse_arguments
cmake_parse_arguments — CMake 3.24.0-rc3 Documentation
cmake_path
cmake_path — CMake 3.24.0-rc3 Documentation
cmake_policy
cmake_policy — CMake 3.24.0-rc3 Documentation
configure_file
configure_file — CMake 3.24.0-rc3 Documentation
continue
continue — CMake 3.24.0-rc3 Documentation
else
else — CMake 3.24.0-rc3 Documentation
elseif
elseif — CMake 3.24.0-rc3 Documentation
endforeach
endforeach — CMake 3.24.0-rc3 Documentation
endfunction
endfunction — CMake 3.24.0-rc3 Documentation
endif
endif — CMake 3.24.0-rc3 Documentation
endmacro
endmacro — CMake 3.24.0-rc3 Documentation
endwhile
endwhile — CMake 3.24.0-rc3 Documentation
execute_process
execute_process — CMake 3.24.0-rc3 Documentation
file
file — CMake 3.24.0-rc3 Documentation
find_file
find_file — CMake 3.24.0-rc3 Documentation
find_library
find_library — CMake 3.24.0-rc3 Documentation
find_package
find_package — CMake 3.24.0-rc3 Documentation
CMake的find_package指令详解 - 知乎
CMake 为包构造了一组可能的安装前缀。在每个前缀下搜索几个目录以查找配置文件。下表显示了搜索的目录。每个条目都适用于遵循 Windows ( )、UNIX ( ) 或 Apple ( ) 约定的安装树:
在支持 macOS 的系统上FRAMEWORK和BUNDLE,在以下目录中搜索包含配置文件的框架或应用程序包:
在所有情况下都被视为不区分大小写并对应于任何指定的名称(或由 给出的名称)。
如果_ CMAKE_LIBRARY_ARCHITECTURE变量已设置。包括一个或多个值、或(按该顺序搜索)。
- 在 64 位平台上搜索路径,如果 FIND_LIBRARY_USE_LIB64_PATHS属性设置为。
- 在 32 位平台上搜索路径,如果 FIND_LIBRARY_USE_LIB32_PATHS属性设置为。
- 使用 x32 ABI 在平台上搜索路径FIND_LIBRARY_USE_LIBX32_PATHS属性设置为。
- 总是搜索路径。
find_path
find_path — CMake 3.24.0-rc3 Documentation
find_program
find_program — CMake 3.24.0-rc3 Documentation
foreach
foreach — CMake 3.24.0-rc3 Documentation
function
function — CMake 3.24.0-rc3 Documentation
get_cmake_property
get_cmake_property — CMake 3.24.0-rc3 Documentation
get_directory_property
get_directory_property — CMake 3.24.0-rc3 Documentation
get_filename_component
get_property
get_property — CMake 3.24.0-rc3 Documentation
if
if — CMake 3.24.0-rc3 Documentation
include
include — CMake 3.24.0-rc3 Documentation
include_guard
include_guard — CMake 3.24.0-rc3 Documentation
list
list — CMake 3.24.0-rc3 Documentation
CMake语法—命令list | 程序员灯塔
macro
macro — CMake 3.24.0-rc3 Documentation
mark_as_advanced
mark_as_advanced — CMake 3.24.0-rc3 Documentation
math
math — CMake 3.24.0-rc3 Documentation
message
message — CMake 3.24.0-rc3 Documentation
option
option — CMake 3.24.0-rc3 Documentation
return
return — CMake 3.24.0-rc3 Documentation
separate_arguments
separate_arguments — CMake 3.24.0-rc3 Documentation
set
set — CMake 3.24.0-rc3 Documentation
Cmake命令之set介绍 - 百度文库
cmake命令之set_物随心转的博客-CSDN博客_cmake set命令
set_directory_properties
set_directory_properties — CMake 3.24.0-rc3 Documentation
set_property
set_property — CMake 3.24.0-rc3 Documentation
site_name
site_name — CMake 3.24.0-rc3 Documentation
string
string — CMake 3.24.0-rc3 Documentation
unset
unset — CMake 3.24.0-rc3 Documentation
variable_watch
variable_watch — CMake 3.24.0-rc3 Documentation
while
while — CMake 3.24.0-rc3 Documentation
add_compile_definitions
add_compile_definitions — CMake 3.24.0-rc3 Documentation
cmake(13):构建时设置预处理宏定义以及add_compile_definitions命令详解_翔底的博客-CSDN博客_cmake预定义宏
CMAKE语法:add_definitions、add_compile_options_持续学习,不断沉淀的博客-CSDN博客_add_compile_options
cmake的四个命令:add_compile_options、add_definitions、target_compile_definitions、build_command - DoubleLi - 博客园
add_compile_options
add_compile_options — CMake 3.24.0-rc3 Documentation
add_custom_command
add_custom_command — CMake 3.24.0-rc3 Documentation
add_custom_target
add_custom_target — CMake 3.24.0-rc3 Documentation
add_definitions
add_definitions — CMake 3.24.0-rc3 Documentation
add_dependencies
add_dependencies — CMake 3.24.0-rc3 Documentation
add_executable
add_executable — CMake 3.24.0-rc3 Documentation
add_library
add_library — CMake 3.24.0-rc3 Documentation
javascript:void(0)
cmake : add_library详解_lainegates的博客-CSDN博客_add_library
add_link_options
add_link_options — CMake 3.24.0-rc3 Documentation
add_subdirectory
add_subdirectory — CMake 3.24.0-rc3 Documentation
add_test
add_test — CMake 3.24.0-rc3 Documentation
aux_source_directory
aux_source_directory — CMake 3.24.0-rc3 Documentation
build_command
create_test_sourcelist
define_property
enable_language
enable_language — CMake 3.24.0-rc3 Documentation
enable_testing
enable_testing — CMake 3.24.0-rc3 Documentation
export
fltk_wrap_ui
get_source_file_property
get_target_property
get_test_property
include_directories
include_directories — CMake 3.24.0-rc3 Documentation
install
install — CMake 3.24.0-rc3 Documentation
link_directories
link_directories — CMake 3.24.0-rc3 Documentation
link_libraries
link_libraries — CMake 3.24.0-rc3 Documentation
target_link_libraries 和link_libraries区别_日作诗歌三千首的博客-CSDN博客_target_link_libraries
load_cache
project
project — CMake 3.24.0-rc3 Documentation
remove_definitions
remove_definitions — CMake 3.24.0-rc3 Documentation
set_source_files_properties
set_target_properties
set_tests_properties
source_group
target_compile_definitions
target_compile_definitions — CMake 3.24.0-rc3 Documentation
target_compile_features
target_compile_features — CMake 3.24.0-rc3 Documentation
target_compile_options
target_compile_options — CMake 3.24.0-rc3 Documentation
target_include_directories
target_include_directories — CMake 3.24.0-rc3 Documentation
target_link_directories
target_link_directories — CMake 3.24.0-rc3 Documentation
target_link_libraries
target_link_libraries — CMake 3.24.0-rc3 Documentation
target_link_options
target_link_options — CMake 3.24.0-rc3 Documentation
target_precompile_headers
target_precompile_headers — CMake 3.24.0-rc3 Documentation
target_sources
target_sources — CMake 3.24.0-rc3 Documentation
ctest_build
ctest_configure
ctest_coverage
ctest_empty_binary_directory
ctest_memcheck
ctest_read_custom_files
ctest_run_script
ctest_sleep
ctest_start
ctest_submit
ctest_test
ctest_update
ctest_upload
cmake 环境变量
- CMAKE_PREFIX_PATH
- ADSP_ROOT
- CMAKE_APPLE_SILICON_PROCESSOR
- CMAKE_BUILD_PARALLEL_LEVEL
- CMAKE_BUILD_TYPE
- CMAKE_COLOR_DIAGNOSTICS
- CMAKE_CONFIGURATION_TYPES
- CMAKE_CONFIG_TYPE
- CMAKE_EXPORT_COMPILE_COMMANDS
- CMAKE_GENERATOR
- CMAKE_GENERATOR_INSTANCE
- CMAKE_GENERATOR_PLATFORM
- CMAKE_GENERATOR_TOOLSET
- CMAKE_INSTALL_MODE
- CMAKE_<LANG>_COMPILER_LAUNCHER
- CMAKE_<LANG>_LINKER_LAUNCHER
- CMAKE_MSVCIDE_RUN_PATH
- CMAKE_NO_VERBOSE
- CMAKE_OSX_ARCHITECTURES
- CMAKE_TOOLCHAIN_FILE
- DESTDIR
- LDFLAGS
- MACOSX_DEPLOYMENT_TARGET
- <PackageName>_ROOT
- VERBOSE
- ASM<DIALECT>
- ASM<DIALECT>FLAGS
- CC
- CFLAGS
- CSFLAGS
- CUDAARCHS
- CUDACXX
- CUDAFLAGS
- CUDAHOSTCXX
- CXX
- CXXFLAGS
- FC
- FFLAGS
- HIPCXX
- HIPFLAGS
- ISPC
- ISPCFLAGS
- OBJC
- OBJCXX
- RC
- RCFLAGS
- SWIFTC
- CMAKE_CONFIG_TYPE
- CTEST_INTERACTIVE_DEBUG_MODE
- CTEST_OUTPUT_ON_FAILURE
- CTEST_PARALLEL_LEVEL
- CTEST_PROGRESS_OUTPUT
- CTEST_USE_LAUNCHERS_DEFAULT
- DASHBOARD_TEST_FROM_CTEST
- CCMAKE_COLORS
在构建系统生成期间使用生成器评估表达式以生成特定于每个构建配置的信息
生成原生系统的编辑文件,如windows的vcxproj,linux的makefile
Makefile Generators
- Borland Makefiles
- MSYS Makefiles
- MinGW Makefiles
- NMake Makefiles
- NMake Makefiles JOM
- Unix Makefiles
- Watcom WMake
Ninja Generators
- Ninja
- Ninja Multi-Config
Ninja首页、文档和下载 - 小而快的构建系统 - OSCHINA - 中文开源技术交流社区
Ninja 是 Google 的一名程序员推出的注重速度的构建工具,一般在 Unix/Linux 上的程序通过 make/makefile 来构建编译,而 Ninja 通过将编译任务并行组织,大大提高了构建速度。Ninja 的目标是成为汇编程序。
Visual Studio Generators
- Visual Studio 6
- Visual Studio 7
- Visual Studio 7 .NET 2003
- Visual Studio 8 2005
- Visual Studio 9 2008
- Visual Studio 10 2010
- Visual Studio 11 2012
- Visual Studio 12 2013
- Visual Studio 14 2015
- Visual Studio 15 2017
- Visual Studio 16 2019
- Visual Studio 17 2022
Other Generators
- Green Hills MULTI
- Xcode
- CodeBlocks
- CodeLite
- Eclipse CDT4
- Kate
- Sublime Text 2
cmake 语言。讲述其组织、目录结构、脚本、模块、语法、编码、命令调用等
此处列出的模块是 CMake 发行版的一部分。项目可能提供更多模块,它们的位置可以由CMAKE_MODULE_PATH指定。
这些模块使用include()命令进行加载
- AndroidTestUtilities
- BundleUtilities
- CheckCCompilerFlag
- CheckCompilerFlag
- CheckCSourceCompiles
- CheckCSourceRuns
- CheckCXXCompilerFlag
- CheckCXXSourceCompiles
- CheckCXXSourceRuns
- CheckCXXSymbolExists
- CheckFortranCompilerFlag
- CheckFortranFunctionExists
- CheckFortranSourceCompiles
- CheckFortranSourceRuns
- CheckFunctionExists
- CheckIncludeFileCXX
- CheckIncludeFile
- CheckIncludeFiles
- CheckIPOSupported
- CheckLanguage
- CheckLibraryExists
- CheckLinkerFlag
- CheckOBJCCompilerFlag
- CheckOBJCSourceCompiles
- CheckOBJCSourceRuns
- CheckOBJCXXCompilerFlag
- CheckOBJCXXSourceCompiles
- CheckOBJCXXSourceRuns
- CheckPIESupported
- CheckPrototypeDefinition
- CheckSourceCompiles
- CheckSourceRuns
- CheckStructHasMember
- CheckSymbolExists
- CheckTypeSize
- CheckVariableExists
- CMakeAddFortranSubdirectory
- CMakeBackwardCompatibilityCXX
- CMakeDependentOption
- CMakeFindDependencyMacro
- CMakeFindFrameworks
- CMakeFindPackageMode
- CMakeGraphVizOptions
- CMakePackageConfigHelpers
- CMakePrintHelpers
- CMakePrintSystemInformation
- CMakePushCheckState
- CMakeVerifyManifest
- CPack
- CPackComponent
- CPackIFW
- CPackIFWConfigureFile
- CSharpUtilities
- CTest
- CTestCoverageCollectGCOV
- CTestScriptMode
- CTestUseLaunchers
- Dart
- DeployQt4
- ExternalData
- ExternalProject
- FeatureSummary
- FetchContent
- FindPackageHandleStandardArgs
- FindPackageMessage
- FortranCInterface
- GenerateExportHeader
- GetPrerequisites
- GNUInstallDirs
- GoogleTest
- InstallRequiredSystemLibraries
- ProcessorCount
- SelectLibraryConfigurations
- SquishTestScript
- TestBigEndian
- TestForANSIForScope
- TestForANSIStreamHeaders
- TestForSSTREAM
- TestForSTDNamespace
- UseEcos
- UseJava
- UseSWIG
- UsewxWidgets
这些模块用来搜索第三方软件。它们通常通过find_package()命令进行使用
- FindALSA
- FindArmadillo
- FindASPELL
- FindAVIFile
- FindBacktrace
- FindBISON
- FindBLAS
- FindBoost
- FindBullet
- FindBZip2
- FindCABLE
- FindCoin3D
- FindCUDAToolkit
- FindCups
- FindCURL
- FindCurses
- FindCVS
- FindCxxTest
- FindCygwin
- FindDart
- FindDCMTK
- FindDevIL
- FindDoxygen
- FindEnvModules
- FindEXPAT
- FindFLEX
- FindFLTK
- FindFLTK2
- FindFontconfig
- FindFreetype
- FindGCCXML
- FindGDAL
- FindGettext
- FindGIF
- FindGit
- FindGLEW
- FindGLUT
- FindGnuplot
- FindGnuTLS
- FindGSL
- FindGTest
- FindGTK
- FindGTK2
- FindHDF5
- FindHg
- FindHSPELL
- FindHTMLHelp
- FindIce
- FindIconv
- FindIcotool
- FindICU
- FindImageMagick
- FindIntl
- FindITK
- FindJasper
- FindJava
- FindJNI
- FindJPEG
- FindKDE3
- FindKDE4
- FindLAPACK
- FindLATEX
- FindLibArchive
- FindLibinput
- FindLibLZMA
- FindLibXml2
- FindLibXslt
- FindLTTngUST
- FindLua
- FindLua50
- FindLua51
- FindMatlab
- FindMFC
- FindMotif
- FindMPEG
- FindMPEG2
- FindMPI
- FindMsys
- FindODBC
- FindOpenACC
- FindOpenAL
- FindOpenCL
- FindOpenGL
- FindOpenMP
- FindOpenSceneGraph
- FindOpenSSL
- FindOpenThreads
- Findosg
- Findosg_functions
- FindosgAnimation
- FindosgDB
- FindosgFX
- FindosgGA
- FindosgIntrospection
- FindosgManipulator
- FindosgParticle
- FindosgPresentation
- FindosgProducer
- FindosgQt
- FindosgShadow
- FindosgSim
- FindosgTerrain
- FindosgText
- FindosgUtil
- FindosgViewer
- FindosgVolume
- FindosgWidget
- FindPatch
- FindPerl
- FindPerlLibs
- FindPHP4
- FindPhysFS
- FindPike
- FindPkgConfig
- FindPNG
- FindPostgreSQL
- FindProducer
- FindProtobuf
- FindPython
- FindPython2
- FindPython3
- FindQt3
- FindQt4
- FindQuickTime
- FindRTI
- FindRuby
- FindSDL
- FindSDL_image
- FindSDL_mixer
- FindSDL_net
- FindSDL_sound
- FindSDL_ttf
- FindSelfPackers
- FindSquish
- FindSQLite3
- FindSubversion
- FindSWIG
- FindTCL
- FindTclsh
- FindTclStub
- FindThreads
- FindTIFF
- FindUnixCommands
- FindVTK
- FindVulkan
- FindWget
- FindWish
- FindwxWidgets
- FindX11
- FindXalanC
- FindXCTest
- FindXercesC
- FindXMLRPC
- FindZLIB
包含使用包,包的结构,创建包,注册包
cmake-policies 策略
cmake-presets 与人共享
cmake-properties 属性
cmake-qt qt cmake
cmake-toolchains(7) — CMake 3.24.0-rc3 Documentation
设置编译工具链
cmake-variables(7) — CMake 3.24.0-rc3 Documentation
到此这篇cmake教程官方文档(cmake 教程)的文章就介绍到这了,更多相关内容请继续浏览下面的相关推荐文章,希望大家都能在编程的领域有一番成就!版权声明:
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若内容造成侵权、违法违规、事实不符,请将相关资料发送至xkadmin@xkablog.com进行投诉反馈,一经查实,立即处理!
转载请注明出处,原文链接:https://www.xkablog.com/do-yfwjc/37216.html